Skip to content

Commit

Permalink
indentation in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Jul 18, 2012
1 parent 70ac1c7 commit e1357ca
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 28 deletions.
50 changes: 25 additions & 25 deletions lib/Cake/Console/Templates/default/classes/controller.ctp
Expand Up @@ -49,33 +49,33 @@ class <?php echo $controllerName; ?>Controller extends <?php echo $plugin; ?>App

<?php else:

if (count($helpers)):
echo "/**\n * Helpers\n *\n * @var array\n */\n";
echo "\tpublic \$helpers = array(";
for ($i = 0, $len = count($helpers); $i < $len; $i++):
if ($i != $len - 1):
echo "'" . Inflector::camelize($helpers[$i]) . "', ";
else:
echo "'" . Inflector::camelize($helpers[$i]) . "'";
endif;
endfor;
echo ");\n\n";
endif;
if (count($helpers)):
echo "/**\n * Helpers\n *\n * @var array\n */\n";
echo "\tpublic \$helpers = array(";
for ($i = 0, $len = count($helpers); $i < $len; $i++):
if ($i != $len - 1):
echo "'" . Inflector::camelize($helpers[$i]) . "', ";
else:
echo "'" . Inflector::camelize($helpers[$i]) . "'";
endif;
endfor;
echo ");\n\n";
endif;

if (count($components)):
echo "/**\n * Components\n *\n * @var array\n */\n";
echo "\tpublic \$components = array(";
for ($i = 0, $len = count($components); $i < $len; $i++):
if ($i != $len - 1):
echo "'" . Inflector::camelize($components[$i]) . "', ";
else:
echo "'" . Inflector::camelize($components[$i]) . "'";
endif;
endfor;
echo ");\n\n";
endif;
if (count($components)):
echo "/**\n * Components\n *\n * @var array\n */\n";
echo "\tpublic \$components = array(";
for ($i = 0, $len = count($components); $i < $len; $i++):
if ($i != $len - 1):
echo "'" . Inflector::camelize($components[$i]) . "', ";
else:
echo "'" . Inflector::camelize($components[$i]) . "'";
endif;
endfor;
echo ");\n\n";
endif;

echo trim($actions) . "\n";
echo trim($actions) . "\n";

endif; ?>
}
6 changes: 3 additions & 3 deletions lib/Cake/Console/Templates/default/classes/model.ctp
Expand Up @@ -48,9 +48,9 @@ class <?php echo $name ?> extends <?php echo $plugin; ?>AppModel {
<?php endif;

if ($useTable && $useTable !== Inflector::tableize($name)):
$table = "'$useTable'";
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
echo "\tpublic \$useTable = $table;\n\n";
$table = "'$useTable'";
echo "/**\n * Use table\n *\n * @var mixed False or table name\n */\n";
echo "\tpublic \$useTable = $table;\n\n";
endif;

if ($primaryKey !== 'id'): ?>
Expand Down

0 comments on commit e1357ca

Please sign in to comment.