Skip to content
Permalink
Browse files

Re-order code in Shell::helper() to return slightly earlier

  • Loading branch information...
Gareth Ellis
Gareth Ellis committed Dec 14, 2015
1 parent 75cabfe commit e640420dd99ab0eac999b4131052367ddf65fc6f
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/Cake/Console/Shell.php
@@ -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");

0 comments on commit e640420

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