@@ -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 | { |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | protected function log($logLevel, $message) |
| 46 | 46 | { |
| 47 | - if (! is_null($message)) { |
|
| 47 | + if (!is_null($message)) { |
|
| 48 | 48 | $this->logger->log($logLevel, $message); |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | /** |
| 28 | 28 | * Create a new logger middleware. |
| 29 | 29 | * |
| 30 | - * @param Illuminate\Contracts\Logging\Log $logger |
|
| 30 | + * @param Log $logger |
|
| 31 | 31 | * @param Illuminate\Foundation\Application $app |
| 32 | 32 | */ |
| 33 | 33 | public function __construct(Log $logger, Application $app) |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | /** |
| 23 | 23 | * Create a new command events middleware. |
| 24 | 24 | * |
| 25 | - * @param Illuminate\Contracts\Events\Dispatcher $dispatcher |
|
| 25 | + * @param Dispatcher $dispatcher |
|
| 26 | 26 | */ |
| 27 | 27 | public function __construct(Dispatcher $dispatcher) |
| 28 | 28 | { |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | $this->dispatcher->fire($event); |
| 56 | 56 | |
| 57 | - if (! $event->isExceptionCaught()) { |
|
| 57 | + if (!$event->isExceptionCaught()) { |
|
| 58 | 58 | throw $exception; |
| 59 | 59 | } |
| 60 | 60 | } catch (Throwable $exception) { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | $this->dispatcher->fire($event); |
| 64 | 64 | |
| 65 | - if (! $event->isExceptionCaught()) { |
|
| 65 | + if (!$event->isExceptionCaught()) { |
|
| 66 | 66 | throw $exception; |
| 67 | 67 | } |
| 68 | 68 | } |
@@ -43,12 +43,12 @@ discard block |
||
| 43 | 43 | */ |
| 44 | 44 | protected function registerCommandBus() |
| 45 | 45 | { |
| 46 | - $this->app->singleton('League\Tactician\CommandBus', function ($app) { |
|
| 46 | + $this->app->singleton('League\Tactician\CommandBus', function($app) { |
|
| 47 | 47 | return $app->make('tactician.commandbus'); |
| 48 | 48 | }); |
| 49 | 49 | |
| 50 | - $this->app->singleton('tactician.commandbus', function ($app) { |
|
| 51 | - $middleware = array_map(function ($name) use ($app) { |
|
| 50 | + $this->app->singleton('tactician.commandbus', function($app) { |
|
| 51 | + $middleware = array_map(function($name) use ($app) { |
|
| 52 | 52 | return is_string($name) ? $app->make($name) : $name; |
| 53 | 53 | }, $app->config->get('tactician.middleware')); |
| 54 | 54 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | */ |
| 62 | 62 | protected function registerCommandExecuter() |
| 63 | 63 | { |
| 64 | - $this->app->singleton('TillKruss\LaravelTactician\Contracts\Executer', function ($app) { |
|
| 64 | + $this->app->singleton('TillKruss\LaravelTactician\Contracts\Executer', function($app) { |
|
| 65 | 65 | return $app->make(Executer::class); |
| 66 | 66 | }); |
| 67 | 67 | } |
@@ -71,11 +71,11 @@ discard block |
||
| 71 | 71 | */ |
| 72 | 72 | protected function registerCommandHandlerMiddleware() |
| 73 | 73 | { |
| 74 | - $this->app->bind('League\Tactician\Handler\CommandHandlerMiddleware', function ($app) { |
|
| 74 | + $this->app->bind('League\Tactician\Handler\CommandHandlerMiddleware', function($app) { |
|
| 75 | 75 | return $app->make('tactician.middleware.commandhandler'); |
| 76 | 76 | }); |
| 77 | 77 | |
| 78 | - $this->app->bind('tactician.middleware.commandhandler', function ($app) { |
|
| 78 | + $this->app->bind('tactician.middleware.commandhandler', function($app) { |
|
| 79 | 79 | return new CommandHandlerMiddleware( |
| 80 | 80 | $app->make(CommandNameExtractor::class), |
| 81 | 81 | $app->make(HandlerLocator::class), |
@@ -86,14 +86,14 @@ discard block |
||
| 86 | 86 | |
| 87 | 87 | protected function registerLoggerMiddleware() |
| 88 | 88 | { |
| 89 | - $this->app->bind('League\Tactician\Logger\LoggerMiddleware', function ($app) { |
|
| 89 | + $this->app->bind('League\Tactician\Logger\LoggerMiddleware', function($app) { |
|
| 90 | 90 | return $app->make(LoggerMiddleware::class); |
| 91 | 91 | }); |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | protected function registerCommandEventsMiddleware() |
| 95 | 95 | { |
| 96 | - $this->app->bind('League\Tactician\CommandEvents\EventMiddleware', function ($app) { |
|
| 96 | + $this->app->bind('League\Tactician\CommandEvents\EventMiddleware', function($app) { |
|
| 97 | 97 | return $app->make(EventMiddleware::class); |
| 98 | 98 | }); |
| 99 | 99 | } |
@@ -103,15 +103,15 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | protected function bindTacticianInterfaces() |
| 105 | 105 | { |
| 106 | - $this->app->bind('League\Tactician\Handler\Locator\HandlerLocator', function ($app) { |
|
| 106 | + $this->app->bind('League\Tactician\Handler\Locator\HandlerLocator', function($app) { |
|
| 107 | 107 | return $app->make($app->config->get('tactician.locator')); |
| 108 | 108 | }); |
| 109 | 109 | |
| 110 | - $this->app->bind('League\Tactician\Handler\MethodNameInflector\MethodNameInflector', function ($app) { |
|
| 110 | + $this->app->bind('League\Tactician\Handler\MethodNameInflector\MethodNameInflector', function($app) { |
|
| 111 | 111 | return $app->make($app->config->get('tactician.inflector')); |
| 112 | 112 | }); |
| 113 | 113 | |
| 114 | - $this->app->bind('League\Tactician\Handler\CommandNameExtractor\CommandNameExtractor', function ($app) { |
|
| 114 | + $this->app->bind('League\Tactician\Handler\CommandNameExtractor\CommandNameExtractor', function($app) { |
|
| 115 | 115 | return $app->make($app->config->get('tactician.extractor')); |
| 116 | 116 | }); |
| 117 | 117 | } |