better handling of undefined task methods
This commit is contained in:
parent
620f3ba91f
commit
29d062da75
|
@ -42,8 +42,15 @@ public static function run($arguments = array())
|
||||||
throw new \Exception("Sorry, I can't find that task.");
|
throw new \Exception("Sorry, I can't find that task.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(method_exists($task, $method))
|
||||||
|
{
|
||||||
$task->$method(array_slice($arguments, 1));
|
$task->$method(array_slice($arguments, 1));
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new \Exception("Sorry, I can't find that method!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the given command arguments are valid.
|
* Determine if the given command arguments are valid.
|
||||||
|
|
Loading…
Reference in New Issue