@@ -18,7 +18,7 @@ |
||
18 | 18 | /** |
19 | 19 | * Create a new adjacent locator instance. |
20 | 20 | * |
21 | - * @param Illuminate\Contracts\Container\Container $container |
|
21 | + * @param Container $container |
|
22 | 22 | */ |
23 | 23 | public function __construct(Container $container) |
24 | 24 | { |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | $handler = substr_replace($command, 'CommandHandler', strrpos($command, 'Command')); |
39 | 39 | |
40 | - if (! class_exists($handler)) { |
|
40 | + if (!class_exists($handler)) { |
|
41 | 41 | throw MissingHandlerException::forCommand($command); |
42 | 42 | } |
43 | 43 |
@@ -26,8 +26,8 @@ |
||
26 | 26 | /** |
27 | 27 | * Create a new namespace locator instance. |
28 | 28 | * |
29 | - * @param Illuminate\Contracts\Container\Container $container |
|
30 | - * @param Illuminate\Contracts\Config\Repository $config |
|
29 | + * @param Container $container |
|
30 | + * @param Configuration $config |
|
31 | 31 | */ |
32 | 32 | public function __construct(Container $container, Configuration $config) |
33 | 33 | { |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | $handler = substr_replace($command, 'CommandHandler', strrpos($command, 'Command')); |
39 | 39 | |
40 | - if (! class_exists($handler)) { |
|
40 | + if (!class_exists($handler)) { |
|
41 | 41 | throw MissingHandlerException::forCommand($command); |
42 | 42 | } |
43 | 43 |
@@ -47,7 +47,7 @@ |
||
47 | 47 | { |
48 | 48 | $handlers = $this->config->get('tactician.handlers', []); |
49 | 49 | |
50 | - if (! isset($handlers[$command]) || ! class_exists($handlers[$command])) { |
|
50 | + if (!isset($handlers[$command]) || !class_exists($handlers[$command])) { |
|
51 | 51 | throw MissingHandlerException::forCommand($command); |
52 | 52 | } |
53 | 53 |
@@ -26,8 +26,8 @@ |
||
26 | 26 | /** |
27 | 27 | * Create a new namespace locator instance. |
28 | 28 | * |
29 | - * @param Illuminate\Contracts\Container\Container $container |
|
30 | - * @param Illuminate\Contracts\Config\Repository $config |
|
29 | + * @param Container $container |
|
30 | + * @param Configuration $config |
|
31 | 31 | */ |
32 | 32 | public function __construct(Container $container, Configuration $config) |
33 | 33 | { |
@@ -83,7 +83,7 @@ |
||
83 | 83 | $reflection = new ReflectionClass($command); |
84 | 84 | |
85 | 85 | if ($constructor = $reflection->getConstructor()) { |
86 | - $injected = array_map(function ($parameter) use ($command, $source, $extras) { |
|
86 | + $injected = array_map(function($parameter) use ($command, $source, $extras) { |
|
87 | 87 | return $this->getParameterValueForCommand($command, $source, $parameter, $extras); |
88 | 88 | }, $constructor->getParameters()); |
89 | 89 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | /** |
23 | 23 | * Create a new command bus executer. |
24 | 24 | * |
25 | - * @param League\Tactician\CommandBus $bus |
|
25 | + * @param CommandBus $bus |
|
26 | 26 | */ |
27 | 27 | public function __construct(CommandBus $bus) |
28 | 28 | { |
@@ -45,12 +45,12 @@ discard block |
||
45 | 45 | */ |
46 | 46 | protected function registerCommandBus() |
47 | 47 | { |
48 | - $this->app->singleton('League\Tactician\CommandBus', function ($app) { |
|
48 | + $this->app->singleton('League\Tactician\CommandBus', function($app) { |
|
49 | 49 | return $app->make('tactician.commandbus'); |
50 | 50 | }); |
51 | 51 | |
52 | - $this->app->singleton('tactician.commandbus', function ($app) { |
|
53 | - $middleware = array_map(function ($name) use ($app) { |
|
52 | + $this->app->singleton('tactician.commandbus', function($app) { |
|
53 | + $middleware = array_map(function($name) use ($app) { |
|
54 | 54 | return is_string($name) ? $app->make($name) : $name; |
55 | 55 | }, $app->config->get('tactician.middleware')); |
56 | 56 | |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | */ |
66 | 66 | protected function registerCommandExecuter() |
67 | 67 | { |
68 | - $this->app->singleton('TillKruss\LaravelTactician\Contracts\Executer', function ($app) { |
|
68 | + $this->app->singleton('TillKruss\LaravelTactician\Contracts\Executer', function($app) { |
|
69 | 69 | return $app->make(TillKruss\LaravelTactician\Executer::class); |
70 | 70 | }); |
71 | 71 | } |
@@ -77,11 +77,11 @@ discard block |
||
77 | 77 | */ |
78 | 78 | protected function registerCommandHandlerMiddleware() |
79 | 79 | { |
80 | - $this->app->bind('League\Tactician\Handler\CommandHandlerMiddleware', function ($app) { |
|
80 | + $this->app->bind('League\Tactician\Handler\CommandHandlerMiddleware', function($app) { |
|
81 | 81 | return $app->make('tactician.middleware.commandhandler'); |
82 | 82 | }); |
83 | 83 | |
84 | - $this->app->bind('tactician.middleware.commandhandler', function ($app) { |
|
84 | + $this->app->bind('tactician.middleware.commandhandler', function($app) { |
|
85 | 85 | return new CommandHandlerMiddleware( |
86 | 86 | $app->make(CommandNameExtractor::class), |
87 | 87 | $app->make(HandlerLocator::class), |
@@ -97,15 +97,15 @@ discard block |
||
97 | 97 | */ |
98 | 98 | protected function bindTacticianInterfaces() |
99 | 99 | { |
100 | - $this->app->bind('League\Tactician\Handler\Locator\HandlerLocator', function ($app) { |
|
100 | + $this->app->bind('League\Tactician\Handler\Locator\HandlerLocator', function($app) { |
|
101 | 101 | return $app->make($app->config->get('tactician.locator')); |
102 | 102 | }); |
103 | 103 | |
104 | - $this->app->bind('League\Tactician\Handler\MethodNameInflector\MethodNameInflector', function ($app) { |
|
104 | + $this->app->bind('League\Tactician\Handler\MethodNameInflector\MethodNameInflector', function($app) { |
|
105 | 105 | return $app->make($app->config->get('tactician.inflector')); |
106 | 106 | }); |
107 | 107 | |
108 | - $this->app->bind('League\Tactician\Handler\CommandNameExtractor\CommandNameExtractor', function ($app) { |
|
108 | + $this->app->bind('League\Tactician\Handler\CommandNameExtractor\CommandNameExtractor', function($app) { |
|
109 | 109 | return $app->make($app->config->get('tactician.extractor')); |
110 | 110 | }); |
111 | 111 | } |