@@ -23,7 +23,7 @@ |
||
| 23 | 23 | /** |
| 24 | 24 | * Create a new command bus executer. |
| 25 | 25 | * |
| 26 | - * @param Illuminate\Contracts\Container\Container $container |
|
| 26 | + * @param Container $container |
|
| 27 | 27 | */ |
| 28 | 28 | public function __construct(Container $container) |
| 29 | 29 | { |
@@ -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 | } |
@@ -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 mapping 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 | { |
@@ -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 | { |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | trim(str_ireplace($namespaces['commands'], '', $command), '\\') |
| 54 | 54 | ); |
| 55 | 55 | |
| 56 | - if (! class_exists($handler)) { |
|
| 56 | + if (!class_exists($handler)) { |
|
| 57 | 57 | throw MissingHandlerException::forCommand($handler); |
| 58 | 58 | } |
| 59 | 59 | |
@@ -45,17 +45,17 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | protected function registerCommandBus() |
| 47 | 47 | { |
| 48 | - $this->app->bind('League\Tactician\CommandBus', function ($app, $parameters) { |
|
| 48 | + $this->app->bind('League\Tactician\CommandBus', function($app, $parameters) { |
|
| 49 | 49 | return $app->make('tactician.commandbus', $parameters); |
| 50 | 50 | }); |
| 51 | 51 | |
| 52 | - $this->app->bind('tactician.commandbus', function ($app, $parameters) { |
|
| 52 | + $this->app->bind('tactician.commandbus', function($app, $parameters) { |
|
| 53 | 53 | $middleware = array_merge( |
| 54 | 54 | isset($parameters[0]) ? $parameters[0] : [], |
| 55 | 55 | $app->config->get('tactician.middleware') |
| 56 | 56 | ); |
| 57 | 57 | |
| 58 | - $resolvedMiddleware = array_map(function ($name) use ($app) { |
|
| 58 | + $resolvedMiddleware = array_map(function($name) use ($app) { |
|
| 59 | 59 | return is_string($name) ? $app->make($name) : $name; |
| 60 | 60 | }, $middleware); |
| 61 | 61 | |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | */ |
| 71 | 71 | protected function registerCommandExecuter() |
| 72 | 72 | { |
| 73 | - $this->app->bind('TillKruss\LaravelTactician\Contracts\Executer', function ($app) { |
|
| 73 | + $this->app->bind('TillKruss\LaravelTactician\Contracts\Executer', function($app) { |
|
| 74 | 74 | return $app->make(TillKruss\LaravelTactician\Executer::class); |
| 75 | 75 | }); |
| 76 | 76 | } |
@@ -82,11 +82,11 @@ discard block |
||
| 82 | 82 | */ |
| 83 | 83 | protected function registerCommandHandlerMiddleware() |
| 84 | 84 | { |
| 85 | - $this->app->bind('League\Tactician\Handler\CommandHandlerMiddleware', function ($app) { |
|
| 85 | + $this->app->bind('League\Tactician\Handler\CommandHandlerMiddleware', function($app) { |
|
| 86 | 86 | return $app->make('tactician.middleware.commandhandler'); |
| 87 | 87 | }); |
| 88 | 88 | |
| 89 | - $this->app->bind('tactician.middleware.commandhandler', function ($app) { |
|
| 89 | + $this->app->bind('tactician.middleware.commandhandler', function($app) { |
|
| 90 | 90 | return new CommandHandlerMiddleware( |
| 91 | 91 | $app->make(CommandNameExtractor::class), |
| 92 | 92 | $app->make(HandlerLocator::class), |
@@ -102,15 +102,15 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | protected function bindTacticianInterfaces() |
| 104 | 104 | { |
| 105 | - $this->app->bind('League\Tactician\Handler\Locator\HandlerLocator', function ($app) { |
|
| 105 | + $this->app->bind('League\Tactician\Handler\Locator\HandlerLocator', function($app) { |
|
| 106 | 106 | return $app->make($app->config->get('tactician.locator')); |
| 107 | 107 | }); |
| 108 | 108 | |
| 109 | - $this->app->bind('League\Tactician\Handler\MethodNameInflector\MethodNameInflector', function ($app) { |
|
| 109 | + $this->app->bind('League\Tactician\Handler\MethodNameInflector\MethodNameInflector', function($app) { |
|
| 110 | 110 | return $app->make($app->config->get('tactician.inflector')); |
| 111 | 111 | }); |
| 112 | 112 | |
| 113 | - $this->app->bind('League\Tactician\Handler\CommandNameExtractor\CommandNameExtractor', function ($app) { |
|
| 113 | + $this->app->bind('League\Tactician\Handler\CommandNameExtractor\CommandNameExtractor', function($app) { |
|
| 114 | 114 | return $app->make($app->config->get('tactician.extractor')); |
| 115 | 115 | }); |
| 116 | 116 | } |