Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

indentation in templates #720

Merged
merged 2 commits into from
Jul 18, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/Cake/Cache/CacheEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function init($settings = array()) {
* Garbage collection
*
* Permanently remove all expired and deleted data
*
*
* @param integer $expires [optional] An expires timestamp, invalidataing all data before.
* @return void
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Cache/Engine/FileEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function init($settings = array()) {

/**
* Garbage collection. Permanently remove all expired and deleted data
*
*
* @param integer $expires [optional] An expires timestamp, invalidataing all data before.
* @return boolean True if garbage collection was successful, false on failure
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Console/Command/Task/TemplateTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function initialize() {
*
* Bake themes are directories not named `skel` inside a `Console/Templates` path.
* They are listed in this order: app -> plugin -> default
*
*
* @return array Array of bake themes that are installed.
*/
protected function _findThemes() {
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Console/Command/TestShell.php
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ public function available() {
* Find the test case for the passed file. The file could itself be a test.
*
* @param string $file
* @param string $category
* @param boolean $throwOnMissingFile
* @param string $category
* @param boolean $throwOnMissingFile
* @access protected
* @return array(type, case)
* @throws Exception
Expand Down
50 changes: 25 additions & 25 deletions lib/Cake/Console/Templates/default/classes/controller.ctp
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
4 changes: 2 additions & 2 deletions lib/Cake/Console/Templates/skel/Config/core.php
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@
Configure::write('Acl.database', 'default');

/**
* Uncomment this line and correct your server timezone to fix
* Uncomment this line and correct your server timezone to fix
* any date & time related errors.
*/
//date_default_timezone_set('UTC');
Expand Down Expand Up @@ -299,7 +299,7 @@
* By default File is used, but for improved performance you should use APC.
*
* Note: 'default' and other application caches should be configured in app/Config/bootstrap.php.
* Please check the comments in boostrap.php for more info on the cache engines available
* Please check the comments in boostrap.php for more info on the cache engines available
* and their setttings.
*/
$engine = 'File';
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function startup(Controller $controller) {
}

/**
* Called before the Controller::beforeRender(), and before
* Called before the Controller::beforeRender(), and before
* the view class is loaded, and before Controller::render()
*
* @param Controller $controller Controller with components to beforeRender
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Acl/IniAcl.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public function check($aro, $aco, $action = null) {
}

/**
* Parses an INI file and returns an array that reflects the
* Parses an INI file and returns an array that reflects the
* INI file's section structure. Double-quote friendly.
*
* @param string $filename File
Expand Down
34 changes: 17 additions & 17 deletions lib/Cake/Controller/Component/Acl/PhpAcl.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

/**
* PhpAcl implements an access control system using a plain PHP configuration file.
* PhpAcl implements an access control system using a plain PHP configuration file.
* An example file can be found in app/Config/acl.php
*
* @package Cake.Controller.Component.Acl
Expand Down Expand Up @@ -46,7 +46,7 @@ class PhpAcl extends Object implements AclInterface {

/**
* Aco Object
*
*
* @var PhpAco
*/
public $Aco = null;
Expand All @@ -65,8 +65,8 @@ public function __construct() {

/**
* Initialize method
*
* @param AclComponent $Component Component instance
*
* @param AclComponent $Component Component instance
* @return void
*/
public function initialize(Component $Component) {
Expand Down Expand Up @@ -199,7 +199,7 @@ class PhpAco {

/**
* map modifiers for ACO paths to their respective PCRE pattern
*
*
* @var array
*/
public static $modifiers = array(
Expand Down Expand Up @@ -263,7 +263,7 @@ public function path($aco) {
/**
* allow/deny ARO access to ARO
*
* @return void
* @return void
*/
public function access($aro, $aco, $action, $type = 'deny') {
$aco = $this->resolve($aco);
Expand Down Expand Up @@ -315,7 +315,7 @@ public function resolve($aco) {
*
* @param array $allow ACO allow rules
* @param array $deny ACO deny rules
* @return void
* @return void
*/
public function build(array $allow, array $deny = array()) {
$stack = array();
Expand Down Expand Up @@ -349,7 +349,7 @@ public function build(array $allow, array $deny = array()) {
class PhpAro {

/**
* role to resolve to when a provided ARO is not listed in
* role to resolve to when a provided ARO is not listed in
* the internal tree
*
* @var string
Expand All @@ -359,12 +359,12 @@ class PhpAro {
/**
* map external identifiers. E.g. if
*
* array('User' => array('username' => 'jeff', 'role' => 'editor'))
* array('User' => array('username' => 'jeff', 'role' => 'editor'))
*
* is passed as an ARO to one of the methods of AclComponent, PhpAcl
* is passed as an ARO to one of the methods of AclComponent, PhpAcl
* will check if it can be resolved to an User or a Role defined in the
* configuration file.
*
* configuration file.
*
* @var array
* @see app/Config/acl.php
*/
Expand All @@ -375,7 +375,7 @@ class PhpAro {

/**
* aliases to map
*
*
* @var array
*/
public $aliases = array();
Expand All @@ -400,9 +400,9 @@ public function __construct(array $aro = array(), array $map = array(), array $a
* From the perspective of the given ARO, walk down the tree and
* collect all inherited AROs levelwise such that AROs from different
* branches with equal distance to the requested ARO will be collected at the same
* index. The resulting array will contain a prioritized list of (list of) roles ordered from
* index. The resulting array will contain a prioritized list of (list of) roles ordered from
* the most distant AROs to the requested one itself.
*
*
* @param string|array $aro An ARO identifier
* @return array prioritized AROs
*/
Expand All @@ -427,7 +427,7 @@ public function roles($aro) {

/**
* resolve an ARO identifier to an internal ARO string using
* the internal mapping information.
* the internal mapping information.
*
* @param string|array $aro ARO identifier (User.jeff, array('User' => ...), etc)
* @return string internal aro string (e.g. User/jeff, Role/default)
Expand Down Expand Up @@ -529,7 +529,7 @@ public function addAlias(array $alias) {
* build an ARO tree structure for internal processing
*
* @param array $aros array of AROs as key and their inherited AROs as values
* @return void
* @return void
*/
public function build(array $aros) {
$this->_tree = array();
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/Auth/DigestAuthenticate.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class DigestAuthenticate extends BaseAuthenticate {
* - `realm` The realm authentication is for, Defaults to the servername.
* - `nonce` A nonce used for authentication. Defaults to `uniqid()`.
* - `qop` Defaults to auth, no other values are supported at this time.
* - `opaque` A string that must be returned unchanged by clients.
* - `opaque` A string that must be returned unchanged by clients.
* Defaults to `md5($settings['realm'])`
*
* @var array
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/CookieComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class CookieComponent extends Component {

/**
* A reference to the Controller's CakeResponse object
*
*
* @var CakeResponse
*/
protected $_response = null;
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/SecurityComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
App::uses('Security', 'Utility');

/**
* The Security Component creates an easy way to integrate tighter security in
* The Security Component creates an easy way to integrate tighter security in
* your application. It provides methods for various tasks like:
*
* - Restricting which HTTP methods your application accepts.
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/SessionComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
App::uses('CakeSession', 'Model/Datasource');

/**
* The CakePHP SessionComponent provides a way to persist client data between
* page requests. It acts as a wrapper for the `$_SESSION` as well as providing
* The CakePHP SessionComponent provides a way to persist client data between
* page requests. It acts as a wrapper for the `$_SESSION` as well as providing
* convenience methods for several `$_SESSION` related functions.
*
* @package Cake.Controller.Component
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Core/CakePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

/**
* CakePlugin is responsible for loading and unloading plugins. It also can
* CakePlugin is responsible for loading and unloading plugins. It also can
* retrieve plugin paths and load their bootstrap and routes files.
*
* @package Cake.Core
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Core/Configure.php
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ public static function load($key, $config = 'default', $merge = true) {
/**
* Dump data currently in Configure into $filename. The serialization format
* is decided by the config reader attached as $config. For example, if the
* 'default' adapter is a PhpReader, the generated file will be a PHP
* 'default' adapter is a PhpReader, the generated file will be a PHP
* configuration file loadable by the PhpReader.
*
* ## Usage
Expand All @@ -303,7 +303,7 @@ public static function load($key, $config = 'default', $merge = true) {
* @param string $key The identifier to create in the config adapter.
* This could be a filename or a cache key depending on the adapter being used.
* @param string $config The name of the configured adapter to dump data with.
* @param array $keys The name of the top-level keys you want to dump.
* @param array $keys The name of the top-level keys you want to dump.
* This allows you save only some data stored in Configure.
* @return boolean success
* @throws ConfigureException if the adapter does not implement a `dump` method.
Expand Down Expand Up @@ -381,7 +381,7 @@ public static function clear() {
}
/**
* Set the error and exception handlers.
*
*
* @param array $error The Error handling configuration.
* @param array $exception The exception handling configuration.
* @return void
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Event/CakeEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class CakeEvent {

/**
* Name of the event
*
*
* @var string $name
*/
protected $_name = null;
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Event/CakeEventManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class CakeEventManager {
protected $_listeners = array();

/**
* Internal flag to distinguish a common manager from the sigleton
* Internal flag to distinguish a common manager from the sigleton
*
* @var boolean
*/
Expand All @@ -64,7 +64,7 @@ class CakeEventManager {
*
* If called with a first params, it will be set as the globally available instance
*
* @param CakeEventManager $manager
* @param CakeEventManager $manager
* @return CakeEventManager the global event manager
*/
public static function instance($manager = null) {
Expand All @@ -80,7 +80,7 @@ public static function instance($manager = null) {
}

/**
* Adds a new listener to an event. Listeners
* Adds a new listener to an event. Listeners
*
* @param callback|CakeEventListener $callable PHP valid callback type or instance of CakeEventListener to be called
* when the event named with $eventKey is triggered. If a CakeEventListener instances is passed, then the `implementedEvents`
Expand Down
4 changes: 2 additions & 2 deletions lib/Cake/Model/Behavior/ContainableBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
*/

/**
* Behavior to allow for dynamic and atomic manipulation of a Model's associations
* used for a find call. Most useful for limiting the amount of associations and
* Behavior to allow for dynamic and atomic manipulation of a Model's associations
* used for a find call. Most useful for limiting the amount of associations and
* data returned.
*
* @package Cake.Model.Behavior
Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/Model/ConnectionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* Manages loaded instances of DataSource objects
*
* Provides an interface for loading and enumerating connections defined in
* Provides an interface for loading and enumerating connections defined in
* app/Config/database.php
*
* @package Cake.Model
Expand Down
Loading