From 7894217cc2635fedd738dee7956b5f0e3d1c3eab Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Mon, 6 Aug 2012 21:54:40 -0400 Subject: [PATCH] renamed method names. --- framework/console/commands/HelpController.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/framework/console/commands/HelpController.php b/framework/console/commands/HelpController.php index 0b1dd07..d986363 100644 --- a/framework/console/commands/HelpController.php +++ b/framework/console/commands/HelpController.php @@ -50,7 +50,7 @@ class HelpController extends Controller public function actionIndex($args = array()) { if (empty($args)) { - $status = $this->helpIndex(); + $status = $this->getHelp(); } else { $result = \Yii::$application->createController($args[0]); if ($result === false) { @@ -61,9 +61,9 @@ class HelpController extends Controller list($controller, $action) = $result; if ($action === '') { - $status = $this->helpController($controller); + $status = $this->getControllerHelp($controller); } else { - $status = $this->helpAction($controller, $action); + $status = $this->getActionHelp($controller, $action); } } return $status; @@ -90,6 +90,7 @@ class HelpController extends Controller $actions = array_keys($controller->actions); $class = new \ReflectionClass($controller); foreach ($class->getMethods() as $method) { + /** @var $method \ReflectionMethod */ $name = $method->getName(); if ($method->isPublic() && !$method->isStatic() && strpos($name, 'action') === 0) { $actions[] = lcfirst(substr($name, 6)); @@ -140,7 +141,7 @@ class HelpController extends Controller * Displays all available commands. * @return integer the exit status */ - protected function helpIndex() + protected function getHelp() { $commands = $this->getCommands(); if ($commands !== array()) { @@ -162,7 +163,7 @@ class HelpController extends Controller * @param Controller $controller the controller instance * @return integer the exit status */ - protected function helpController($controller) + protected function getControllerHelp($controller) { $class = new \ReflectionClass($controller); $comment = strtr(trim(preg_replace('/^\s*\**( |\t)?/m', '', trim($class->getDocComment(), '/'))), "\r", ''); @@ -213,7 +214,7 @@ class HelpController extends Controller * @param string $actionID action ID * @return integer the exit status */ - protected function helpAction($controller, $actionID) + protected function getActionHelp($controller, $actionID) { $action = $controller->createAction($actionID); if ($action === null) {