Skip to content

Commit

Permalink
Re-order code in Shell::helper() to return slightly earlier
Browse files Browse the repository at this point in the history
  • Loading branch information
Gareth Ellis committed Dec 14, 2015
1 parent 75cabfe commit e640420
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Cake/Console/Shell.php
Expand Up @@ -793,11 +793,11 @@ public function createFile($path, $contents) {
* @throws RuntimeException If invalid class name is provided
*/
public function helper($name) {
list($plugin, $helperClassName) = pluginSplit($name, true);
$helperClassName = Inflector::camelize($name) . "ShellHelper";
if (isset($this->_helpers[$name])) {
return $this->_helpers[$name];
}
list($plugin, $helperClassName) = pluginSplit($name, true);
$helperClassName = Inflector::camelize($name) . "ShellHelper";
App::uses($helperClassName, $plugin . "Console/Helper");
if (!class_exists($helperClassName)) {
throw new RuntimeException("Class " . $helperClassName . " not found");
Expand Down

0 comments on commit e640420

Please sign in to comment.