Permalink
Browse files

Fixing coding conventions

  • Loading branch information...
1 parent d5b5327 commit 97ebbc8e2353c9ac35a449087fdb3e7caa0c2c7c Jelle Henkens committed May 19, 2012
Showing with 83 additions and 83 deletions.
  1. +2 −2 lib/Cake/Console/Templates/default/classes/fixture.ctp
  2. +2 −2 lib/Cake/Console/Templates/default/classes/test.ctp
  3. +6 −6 lib/Cake/Console/Templates/default/views/form.ctp
  4. +8 −8 lib/Cake/Console/Templates/default/views/index.ctp
  5. +15 −15 lib/Cake/Console/Templates/default/views/view.ctp
  6. +2 −2 lib/Cake/Console/Templates/skel/View/Layouts/Emails/html/default.ctp
  7. +1 −1 lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp
  8. +1 −1 lib/Cake/Console/Templates/skel/View/Pages/home.ctp
  9. +2 −2 lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
  10. +1 −1 lib/Cake/Test/Case/Routing/Route/CakeRouteTest.php
  11. +1 −1 lib/Cake/Test/Case/Utility/CakeNumberTest.php
  12. +1 −1 lib/Cake/Test/Case/Utility/CakeTimeTest.php
  13. +1 −1 lib/Cake/Test/Case/Utility/HashTest.php
  14. +1 −1 lib/Cake/Test/Case/Utility/SetTest.php
  15. +1 −1 lib/Cake/Test/Case/View/Helper/PaginatorHelperTest.php
  16. +2 −2 lib/Cake/Test/test_app/View/Layouts/Emails/html/default.ctp
  17. +2 −2 lib/Cake/Test/test_app/View/Layouts/Emails/html/japanese.ctp
  18. +2 −2 lib/Cake/Test/test_app/View/Layouts/Emails/html/thin.ctp
  19. +1 −1 lib/Cake/Test/test_app/View/Layouts/Emails/text/default.ctp
  20. +1 −1 lib/Cake/Test/test_app/View/Layouts/Emails/text/japanese.ctp
  21. +1 −1 lib/Cake/Test/test_app/View/Pages/home.ctp
  22. +3 −3 lib/Cake/Test/test_app/View/Posts/cache_form.ctp
  23. +5 −5 lib/Cake/TestSuite/templates/menu.php
  24. +1 −1 lib/Cake/Utility/File.php
  25. +2 −2 lib/Cake/Utility/Inflector.php
  26. +2 −2 lib/Cake/View/Errors/missing_action.ctp
  27. +1 −1 lib/Cake/View/Helper/CacheHelper.php
  28. +3 −3 lib/Cake/View/Scaffolds/form.ctp
  29. +6 −6 lib/Cake/View/Scaffolds/index.ctp
  30. +6 −6 lib/Cake/View/Scaffolds/view.ctp
@@ -52,7 +52,7 @@ class <?php echo $model; ?>Fixture extends CakeTestFixture {
*/
public $fields = <?php echo $schema; ?>;
-<?php endif;?>
+<?php endif; ?>
<?php if ($records): ?>
/**
* Records
@@ -61,5 +61,5 @@ class <?php echo $model; ?>Fixture extends CakeTestFixture {
*/
public $records = <?php echo $records; ?>;
-<?php endif;?>
+<?php endif; ?>
}
@@ -62,7 +62,7 @@ class <?php echo $fullClassName; ?>Test extends CakeTestCase {
* @return void
*/
public function tearDown() {
- unset($this-><?php echo $className;?>);
+ unset($this-><?php echo $className; ?>);
parent::tearDown();
}
@@ -76,5 +76,5 @@ class <?php echo $fullClassName; ?>Test extends CakeTestCase {
public function test<?php echo Inflector::camelize($method); ?>() {
}
-<?php endforeach;?>
+<?php endforeach; ?>
}
@@ -16,8 +16,8 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
?>
-<div class="<?php echo $pluralVar;?> form">
-<?php echo "<?php echo \$this->Form->create('{$modelClass}');?>\n";?>
+<div class="<?php echo $pluralVar; ?> form">
+<?php echo "<?php echo \$this->Form->create('{$modelClass}'); ?>\n"; ?>
<fieldset>
<legend><?php printf("<?php echo __('%s %s'); ?>", Inflector::humanize($action), $singularHumanName); ?></legend>
<?php
@@ -38,17 +38,17 @@
?>
</fieldset>
<?php
- echo "<?php echo \$this->Form->end(__('Submit'));?>\n";
+ echo "<?php echo \$this->Form->end(__('Submit')); ?>\n";
?>
</div>
<div class="actions">
<h3><?php echo "<?php echo __('Actions'); ?>"; ?></h3>
<ul>
<?php if (strpos($action, 'add') === false): ?>
- <li><?php echo "<?php echo \$this->Form->postLink(__('Delete'), array('action' => 'delete', \$this->Form->value('{$modelClass}.{$primaryKey}')), null, __('Are you sure you want to delete # %s?', \$this->Form->value('{$modelClass}.{$primaryKey}'))); ?>";?></li>
-<?php endif;?>
- <li><?php echo "<?php echo \$this->Html->link(__('List " . $pluralHumanName . "'), array('action' => 'index'));?>";?></li>
+ <li><?php echo "<?php echo \$this->Form->postLink(__('Delete'), array('action' => 'delete', \$this->Form->value('{$modelClass}.{$primaryKey}')), null, __('Are you sure you want to delete # %s?', \$this->Form->value('{$modelClass}.{$primaryKey}'))); ?>"; ?></li>
+<?php endif; ?>
+ <li><?php echo "<?php echo \$this->Html->link(__('List " . $pluralHumanName . "'), array('action' => 'index')); ?>"; ?></li>
<?php
$done = array();
foreach ($associations as $type => $data) {
@@ -16,14 +16,14 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
?>
-<div class="<?php echo $pluralVar;?> index">
- <h2><?php echo "<?php echo __('{$pluralHumanName}');?>";?></h2>
+<div class="<?php echo $pluralVar; ?> index">
+ <h2><?php echo "<?php echo __('{$pluralHumanName}'); ?>"; ?></h2>
<table cellpadding="0" cellspacing="0">
<tr>
- <?php foreach ($fields as $field):?>
- <th><?php echo "<?php echo \$this->Paginator->sort('{$field}');?>";?></th>
- <?php endforeach;?>
- <th class="actions"><?php echo "<?php echo __('Actions');?>";?></th>
+ <?php foreach ($fields as $field): ?>
+ <th><?php echo "<?php echo \$this->Paginator->sort('{$field}'); ?>"; ?></th>
+ <?php endforeach; ?>
+ <th class="actions"><?php echo "<?php echo __('Actions'); ?>"; ?></th>
</tr>
<?php
echo "<?php
@@ -60,7 +60,7 @@
echo \$this->Paginator->counter(array(
'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
));
- ?>";?>
+ ?>"; ?>
</p>
<div class="paging">
@@ -76,7 +76,7 @@
<div class="actions">
<h3><?php echo "<?php echo __('Actions'); ?>"; ?></h3>
<ul>
- <li><?php echo "<?php echo \$this->Html->link(__('New " . $singularHumanName . "'), array('action' => 'add')); ?>";?></li>
+ <li><?php echo "<?php echo \$this->Html->link(__('New " . $singularHumanName . "'), array('action' => 'add')); ?>"; ?></li>
<?php
$done = array();
foreach ($associations as $type => $data) {
@@ -16,8 +16,8 @@
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
?>
-<div class="<?php echo $pluralVar;?> view">
-<h2><?php echo "<?php echo __('{$singularHumanName}');?>";?></h2>
+<div class="<?php echo $pluralVar; ?> view">
+<h2><?php echo "<?php echo __('{$singularHumanName}'); ?>"; ?></h2>
<dl>
<?php
foreach ($fields as $field) {
@@ -66,20 +66,20 @@ foreach ($fields as $field) {
if (!empty($associations['hasOne'])) :
foreach ($associations['hasOne'] as $alias => $details): ?>
<div class="related">
- <h3><?php echo "<?php echo __('Related " . Inflector::humanize($details['controller']) . "');?>";?></h3>
- <?php echo "<?php if (!empty(\${$singularVar}['{$alias}'])):?>\n";?>
+ <h3><?php echo "<?php echo __('Related " . Inflector::humanize($details['controller']) . "'); ?>"; ?></h3>
+ <?php echo "<?php if (!empty(\${$singularVar}['{$alias}'])): ?>\n"; ?>
<dl>
<?php
foreach ($details['fields'] as $field) {
- echo "\t\t<dt><?php echo __('" . Inflector::humanize($field) . "');?></dt>\n";
- echo "\t\t<dd>\n\t<?php echo \${$singularVar}['{$alias}']['{$field}'];?>\n&nbsp;</dd>\n";
+ echo "\t\t<dt><?php echo __('" . Inflector::humanize($field) . "'); ?></dt>\n";
+ echo "\t\t<dd>\n\t<?php echo \${$singularVar}['{$alias}']['{$field}']; ?>\n&nbsp;</dd>\n";
}
?>
</dl>
- <?php echo "<?php endif; ?>\n";?>
+ <?php echo "<?php endif; ?>\n"; ?>
<div class="actions">
<ul>
- <li><?php echo "<?php echo \$this->Html->link(__('Edit " . Inflector::humanize(Inflector::underscore($alias)) . "'), array('controller' => '{$details['controller']}', 'action' => 'edit', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?></li>\n";?>
+ <li><?php echo "<?php echo \$this->Html->link(__('Edit " . Inflector::humanize(Inflector::underscore($alias)) . "'), array('controller' => '{$details['controller']}', 'action' => 'edit', \${$singularVar}['{$alias}']['{$details['primaryKey']}'])); ?></li>\n"; ?>
</ul>
</div>
</div>
@@ -99,24 +99,24 @@ foreach ($relations as $alias => $details):
$otherPluralHumanName = Inflector::humanize($details['controller']);
?>
<div class="related">
- <h3><?php echo "<?php echo __('Related " . $otherPluralHumanName . "');?>";?></h3>
- <?php echo "<?php if (!empty(\${$singularVar}['{$alias}'])):?>\n";?>
+ <h3><?php echo "<?php echo __('Related " . $otherPluralHumanName . "'); ?>"; ?></h3>
+ <?php echo "<?php if (!empty(\${$singularVar}['{$alias}'])): ?>\n"; ?>
<table cellpadding = "0" cellspacing = "0">
<tr>
<?php
foreach ($details['fields'] as $field) {
echo "\t\t<th><?php echo __('" . Inflector::humanize($field) . "'); ?></th>\n";
}
?>
- <th class="actions"><?php echo "<?php echo __('Actions');?>";?></th>
+ <th class="actions"><?php echo "<?php echo __('Actions'); ?>"; ?></th>
</tr>
<?php
echo "\t<?php
\$i = 0;
foreach (\${$singularVar}['{$alias}'] as \${$otherSingularVar}): ?>\n";
echo "\t\t<tr>\n";
foreach ($details['fields'] as $field) {
- echo "\t\t\t<td><?php echo \${$otherSingularVar}['{$field}'];?></td>\n";
+ echo "\t\t\t<td><?php echo \${$otherSingularVar}['{$field}']; ?></td>\n";
}
echo "\t\t\t<td class=\"actions\">\n";
@@ -129,11 +129,11 @@ echo "\t<?php
echo "\t<?php endforeach; ?>\n";
?>
</table>
-<?php echo "<?php endif; ?>\n\n";?>
+<?php echo "<?php endif; ?>\n\n"; ?>
<div class="actions">
<ul>
- <li><?php echo "<?php echo \$this->Html->link(__('New " . Inflector::humanize(Inflector::underscore($alias)) . "'), array('controller' => '{$details['controller']}', 'action' => 'add'));?>";?> </li>
+ <li><?php echo "<?php echo \$this->Html->link(__('New " . Inflector::humanize(Inflector::underscore($alias)) . "'), array('controller' => '{$details['controller']}', 'action' => 'add')); ?>"; ?> </li>
</ul>
</div>
</div>
-<?php endforeach;?>
+<?php endforeach; ?>
@@ -20,11 +20,11 @@
<html>
<head>
- <title><?php echo $title_for_layout;?></title>
+ <title><?php echo $title_for_layout; ?></title>
</head>
<body>
- <?php echo $this->fetch('content');?>
+ <?php echo $this->fetch('content'); ?>
<p>This email was sent using the <a href="http://cakephp.org">CakePHP Framework</a></p>
</body>
@@ -17,6 +17,6 @@
*/
?>
-<?php echo $this->fetch('content');?>
+<?php echo $this->fetch('content'); ?>
This email was sent using the CakePHP Framework, http://cakephp.org.
@@ -116,7 +116,7 @@ if (isset($filePresent)):
endif;
?>
</p>
-<?php endif;?>
+<?php endif; ?>
<?php
App::uses('Validation', 'Utility');
if (!Validation::alphaNumeric('cakephp')) {
@@ -2371,10 +2371,10 @@ public function testMixedConditionsParsing() {
* @return void
*/
public function testConditionsOptionalArguments() {
- $result = $this->Dbo->conditions( array('Member.name' => 'Mariano'), true, false);
+ $result = $this->Dbo->conditions(array('Member.name' => 'Mariano'), true, false);
$this->assertRegExp('/^\s*`Member`.`name`\s*=\s*\'Mariano\'\s*$/', $result);
- $result = $this->Dbo->conditions( array(), true, false);
+ $result = $this->Dbo->conditions(array(), true, false);
$this->assertRegExp('/^\s*1\s*=\s*1\s*$/', $result);
}
@@ -869,7 +869,7 @@ public function testParseTrailing() {
* @return void
*/
public function testParseTrailingUTF8() {
- $route = new CakeRoute( '/category/**', array('controller' => 'categories','action' => 'index'));
+ $route = new CakeRoute('/category/**', array('controller' => 'categories','action' => 'index'));
$result = $route->parse('/category/%D9%85%D9%88%D8%A8%D8%A7%DB%8C%D9%84');
$expected = array(
'controller' => 'categories',
@@ -228,7 +228,7 @@ public function testCurrencyAddFormat() {
$this->Number->addFormat('Other2', array('before' => '$ ', 'after' => false));
$result = $this->Number->currency(0.22, 'Other2');
$expected = '$ 0.22';
- $this->assertEquals($expected,$result);
+ $this->assertEquals($expected, $result);
}
/**
@@ -212,7 +212,7 @@ public function testTimeAgoInWords() {
if ($time == time()) {
$expected = 'just now';
$this->assertEquals($expected, $result);
- } else if (date("Y-m-d", $time) == date("Y-m-d")) {
+ } elseif (date("Y-m-d", $time) == date("Y-m-d")) {
$expected = 'Today, ' . date("H:i", $time);
$this->assertEquals($expected, $result);
}
@@ -1196,7 +1196,7 @@ public function testInsertOverwriteStringValue() {
$expected = array(
'Some' => array(
'string' => array(
- 'value' => array( 'values')
+ 'value' => array('values')
)
)
);
@@ -1445,7 +1445,7 @@ public function testClassicExtract() {
);
$result = Set::extract($a, '{n}.Article.id');
- $expected = array( 1, 2, 3 );
+ $expected = array(1, 2, 3);
$this->assertEquals($expected, $result);
$result = Set::extract($a, '{n}.Article.title');
@@ -581,7 +581,7 @@ public function testUrlGenerationWithPrefixes() {
Router::parse('/');
- Router::setRequestInfo( array(
+ Router::setRequestInfo(array(
array('controller' => 'posts', 'action' => 'index', 'form' => array(), 'url' => array(), 'plugin' => null),
array('base' => '', 'here' => 'posts/index', 'webroot' => '/')
));
@@ -20,11 +20,11 @@
<html>
<head>
- <title><?php echo $title_for_layout;?></title>
+ <title><?php echo $title_for_layout; ?></title>
</head>
<body>
- <?php echo $content_for_layout;?>
+ <?php echo $content_for_layout; ?>
<p>This email was sent using the <a href="http://cakephp.org">CakePHP Framework</a></p>
</body>
@@ -20,11 +20,11 @@
<html>
<head>
- <title><?php echo $title_for_layout;?></title>
+ <title><?php echo $title_for_layout; ?></title>
</head>
<body>
- <?php echo $content_for_layout;?>
+ <?php echo $content_for_layout; ?>
<p>このメールは <a href="http://cakephp.org">CakePHP Framework</a> を利用して送信しました。</p>
</body>
@@ -20,11 +20,11 @@
<html>
<head>
- <title><?php echo $title_for_layout;?></title>
+ <title><?php echo $title_for_layout; ?></title>
</head>
<body>
- <?php echo $content_for_layout;?>
+ <?php echo $content_for_layout; ?>
<p>This email was sent using the CakePHP Framework</p>
</body>
@@ -17,6 +17,6 @@
*/
?>
-<?php echo $content_for_layout;?>
+<?php echo $content_for_layout; ?>
This email was sent using the CakePHP Framework, http://cakephp.org.
@@ -17,6 +17,6 @@
*/
?>
-<?php echo $content_for_layout;?>
+<?php echo $content_for_layout; ?>
CakePHP Framework を使って送信したメールです。 http://cakephp.org.
@@ -85,7 +85,7 @@ if (isset($filePresent)):
endif;
?>
</p>
-<?php endif;?>
+<?php endif; ?>
<?php
App::uses('Validation', 'Utility');
if (!Validation::alphaNumeric('cakephp')) {
@@ -1,14 +1,14 @@
<div class="users form">
<!--nocache-->
- <?php echo $this->Form->create('User');?>
+ <?php echo $this->Form->create('User'); ?>
<fieldset>
- <legend><?php echo __('Add User');?></legend>
+ <legend><?php echo __('Add User'); ?></legend>
<?php
echo $this->Form->input('username');
echo $this->Form->input('email');
echo $this->Form->input('password');
?>
</fieldset>
- <?php echo $this->Form->end('Submit');?>
+ <?php echo $this->Form->end('Submit'); ?>
<!--/nocache-->
</div>
Oops, something went wrong. Retry.

0 comments on commit 97ebbc8

Please sign in to comment.