Skip to content

Commit

Permalink
Fix most coding standard issues in Controller.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Mar 4, 2012
1 parent db8c6b5 commit 61aba0f
Show file tree
Hide file tree
Showing 22 changed files with 111 additions and 91 deletions.
1 change: 1 addition & 0 deletions lib/Cake/Controller/CakeErrorController.php
Expand Up @@ -75,4 +75,5 @@ public function beforeRender() {
}
}
}

}
15 changes: 10 additions & 5 deletions lib/Cake/Controller/Component.php
Expand Up @@ -106,7 +106,8 @@ public function __get($name) {
* @return void
* @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::initialize
*/
public function initialize(Controller $controller) { }
public function initialize(Controller $controller) {
}

/**
* Called after the Controller::beforeFilter() and before the controller action
Expand All @@ -115,7 +116,8 @@ public function initialize(Controller $controller) { }
* @return void
* @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::startup
*/
public function startup(Controller $controller) { }
public function startup(Controller $controller) {
}

/**
* Called after the Controller::beforeRender(), after the view class is loaded, and before the
Expand All @@ -125,7 +127,8 @@ public function startup(Controller $controller) { }
* @return void
* @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::beforeRender
*/
public function beforeRender(Controller $controller) { }
public function beforeRender(Controller $controller) {
}

/**
* Called after Controller::render() and before the output is printed to the browser.
Expand All @@ -134,7 +137,8 @@ public function beforeRender(Controller $controller) { }
* @return void
* @link @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::shutdown
*/
public function shutdown(Controller $controller) { }
public function shutdown(Controller $controller) {
}

/**
* Called before Controller::redirect(). Allows you to replace the url that will
Expand All @@ -155,6 +159,7 @@ public function shutdown(Controller $controller) { }
* @return array|null Either an array or null.
* @link @link http://book.cakephp.org/2.0/en/controllers/components.html#Component::beforeRedirect
*/
public function beforeRedirect(Controller $controller, $url, $status = null, $exit = true) {}
public function beforeRedirect(Controller $controller, $url, $status = null, $exit = true) {
}

}
1 change: 1 addition & 0 deletions lib/Cake/Controller/Component/Acl/AclInterface.php
Expand Up @@ -66,4 +66,5 @@ public function inherit($aro, $aco, $action = "*");
* @param AclComponent $component
*/
public function initialize(Component $component);

}
4 changes: 2 additions & 2 deletions lib/Cake/Controller/Component/Acl/DbAcl.php
Expand Up @@ -94,7 +94,7 @@ public function check($aro, $aco, $action = "*") {
$acoIDs = Set::extract($acoPath, '{n}.' . $this->Aco->alias . '.id');

$count = count($aroPath);
for ($i = 0 ; $i < $count; $i++) {
for ($i = 0; $i < $count; $i++) {
$permAlias = $this->Aro->Permission->alias;

$perms = $this->Aro->Permission->find('all', array(
Expand Down Expand Up @@ -289,5 +289,5 @@ protected function _getAcoKeys($keys) {
}
return $newKeys;
}
}

}
12 changes: 5 additions & 7 deletions lib/Cake/Controller/Component/Acl/IniAcl.php
Expand Up @@ -45,7 +45,6 @@ class IniAcl extends Object implements AclInterface {
* @return void
*/
public function initialize(Component $component) {

}

/**
Expand All @@ -57,7 +56,6 @@ public function initialize(Component $component) {
* @return boolean Success
*/
public function allow($aro, $aco, $action = "*") {

}

/**
Expand All @@ -69,7 +67,6 @@ public function allow($aro, $aco, $action = "*") {
* @return boolean Success
*/
public function deny($aro, $aco, $action = "*") {

}

/**
Expand All @@ -81,7 +78,6 @@ public function deny($aro, $aco, $action = "*") {
* @return boolean Success
*/
public function inherit($aro, $aco, $action = "*") {

}

/**
Expand All @@ -91,10 +87,10 @@ public function inherit($aro, $aco, $action = "*") {
*
* @param string $aro ARO
* @param string $aco ACO
* @param string $aco_action Action
* @param string $action Action
* @return boolean Success
*/
public function check($aro, $aco, $aco_action = null) {
public function check($aro, $aco, $action = null) {
if ($this->config == null) {
$this->config = $this->readConfigFile(APP . 'Config' . DS . 'acl.ini.php');
}
Expand Down Expand Up @@ -147,7 +143,8 @@ public function check($aro, $aco, $aco_action = null) {
}

/**
* Parses an INI file and returns an array that reflects the INI file's section structure. Double-quote friendly.
* Parses an INI file and returns an array that reflects the
* INI file's section structure. Double-quote friendly.
*
* @param string $filename File
* @return array INI section structure
Expand All @@ -171,4 +168,5 @@ public function arrayTrim($array) {
array_unshift($array, "");
return $array;
}

}

0 comments on commit 61aba0f

Please sign in to comment.