Skip to content
Permalink
Browse files

Fix most coding standard issues in Controller.

  • Loading branch information...
markstory committed Mar 4, 2012
1 parent db8c6b5 commit 61aba0f0f88af9be51027e83cfcc75f800b609cc
@@ -75,4 +75,5 @@ public function beforeRender() {
}
}
}
}
@@ -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
@@ -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
@@ -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.
@@ -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
@@ -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) {
}
}
@@ -66,4 +66,5 @@ public function inherit($aro, $aco, $action = "*");
* @param AclComponent $component
*/
public function initialize(Component $component);
}
@@ -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(
@@ -289,5 +289,5 @@ protected function _getAcoKeys($keys) {
}
return $newKeys;
}
}
}
@@ -45,7 +45,6 @@ class IniAcl extends Object implements AclInterface {
* @return void
*/
public function initialize(Component $component) {
}
/**
@@ -57,7 +56,6 @@ public function initialize(Component $component) {
* @return boolean Success
*/
public function allow($aro, $aco, $action = "*") {
}
/**
@@ -69,7 +67,6 @@ public function allow($aro, $aco, $action = "*") {
* @return boolean Success
*/
public function deny($aro, $aco, $action = "*") {
}
/**
@@ -81,7 +78,6 @@ public function deny($aro, $aco, $action = "*") {
* @return boolean Success
*/
public function inherit($aro, $aco, $action = "*") {
}
/**
@@ -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');
}
@@ -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
@@ -171,4 +168,5 @@ public function arrayTrim($array) {
array_unshift($array, "");
return $array;
}
}
Oops, something went wrong.

0 comments on commit 61aba0f

Please sign in to comment.
You can’t perform that action at this time.