@@ -3,10 +3,7 @@ |
||
3 | 3 | namespace App\Core; |
4 | 4 | |
5 | 5 | use App\Core\Dispatcher as AppDispatcher; |
6 | -use InvalidArgumentException; |
|
7 | -use Traversable; |
|
8 | 6 | use Zend\Console\Adapter\AdapterInterface as Console; |
9 | -use Zend\Console\Console as DefaultConsole; |
|
10 | 7 | use ZF\Console\RouteCollection; |
11 | 8 | use ZF\Console\Application as ZfApplication; |
12 | 9 | use ZF\Console\Dispatcher; |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | public function dispatch(Route $route, ConsoleAdapter $console) |
19 | 19 | { |
20 | 20 | $name = $route->getName(); |
21 | - if (! isset($this->commandMap[$name])) { |
|
21 | + if (!isset($this->commandMap[ $name ])) { |
|
22 | 22 | $console->writeLine(''); |
23 | 23 | $console->writeLine(sprintf('Unhandled command "%s" invoked', $name), Color::WHITE, Color::RED); |
24 | 24 | $console->writeLine(''); |
@@ -26,17 +26,17 @@ discard block |
||
26 | 26 | return 1; |
27 | 27 | } |
28 | 28 | |
29 | - $callable = $this->commandMap[$name]; |
|
29 | + $callable = $this->commandMap[ $name ]; |
|
30 | 30 | |
31 | - if (! is_callable($callable) && is_string($callable)) { |
|
31 | + if (!is_callable($callable) && is_string($callable)) { |
|
32 | 32 | $callable = new $callable(); |
33 | - if (! is_callable($callable)) { |
|
33 | + if (!is_callable($callable)) { |
|
34 | 34 | throw new RuntimeException(sprintf( |
35 | 35 | 'Invalid command class specified for "%s"; class must be invokable', |
36 | 36 | $name |
37 | 37 | )); |
38 | 38 | } |
39 | - $this->commandMap[$name] = $callable; |
|
39 | + $this->commandMap[ $name ] = $callable; |
|
40 | 40 | } |
41 | 41 | $return = $this->container->call($callable, [ |
42 | 42 | $route, |
@@ -5,11 +5,11 @@ |
||
5 | 5 | 'name' => 'hello', |
6 | 6 | 'route' => "--name=", |
7 | 7 | 'short_description' => "Good morning!! This is a beautiful day", |
8 | - "handler" => ['App\Command\Hello', 'run'], |
|
8 | + "handler" => [ 'App\Command\Hello', 'run' ], |
|
9 | 9 | ], |
10 | 10 | ], |
11 | 11 | "service_manager" => [ |
12 | - "invokables" => [], |
|
13 | - "factories" => [], |
|
12 | + "invokables" => [ ], |
|
13 | + "factories" => [ ], |
|
14 | 14 | ], |
15 | 15 | ]; |