@@ -8,7 +8,7 @@ discard block |
||
| 8 | 8 | { |
| 9 | 9 | |
| 10 | 10 | private $baseCommandBus; |
| 11 | - private $fromQueueCommands = []; |
|
| 11 | + private $fromQueueCommands = [ ]; |
|
| 12 | 12 | |
| 13 | 13 | public function __construct(CommandBusAdapterInterface $baseCommandBus) |
| 14 | 14 | { |
@@ -19,18 +19,18 @@ discard block |
||
| 19 | 19 | { |
| 20 | 20 | if ($fromQueue) { |
| 21 | 21 | $hash = $this->getHash($command); |
| 22 | - $this->fromQueueCommands[$hash] = true; |
|
| 22 | + $this->fromQueueCommands[ $hash ] = true; |
|
| 23 | 23 | } |
| 24 | 24 | $this->baseCommandBus->handle($command, $fromQueue); |
| 25 | 25 | if (isset($hash)) { |
| 26 | - unset($this->fromQueueCommands[$hash]); |
|
| 26 | + unset($this->fromQueueCommands[ $hash ]); |
|
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | public function shouldBeQueued($command): bool |
| 31 | 31 | { |
| 32 | 32 | $hash = $this->getHash($command); |
| 33 | - return !isset($this->fromQueueCommands[$hash]); |
|
| 33 | + return !isset($this->fromQueueCommands[ $hash ]); |
|
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | private function getHash($command): string |
@@ -8,12 +8,12 @@ |
||
| 8 | 8 | /** |
| 9 | 9 | * @var DeciderInterface[] |
| 10 | 10 | */ |
| 11 | - private $deciders = []; |
|
| 11 | + private $deciders = [ ]; |
|
| 12 | 12 | |
| 13 | 13 | public function __construct(array $deciders) |
| 14 | 14 | { |
| 15 | 15 | array_walk($deciders, function (DeciderInterface $decider) { |
| 16 | - $this->deciders[] = $decider; |
|
| 16 | + $this->deciders[ ] = $decider; |
|
| 17 | 17 | }); |
| 18 | 18 | } |
| 19 | 19 | |
@@ -131,7 +131,7 @@ |
||
| 131 | 131 | $this->client->pipeline(function (ClientContextInterface $client) use ($queueName) { |
| 132 | 132 | self::cDeleteQueue($client, $queueName); |
| 133 | 133 | }); |
| 134 | - $this->clearSchedule([$queueName]); |
|
| 134 | + $this->clearSchedule([ $queueName ]); |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | public function purgeCommand(string $queueName, string $id) |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | /** |
| 11 | 11 | * @var MethodNameInflector[] |
| 12 | 12 | */ |
| 13 | - private $inflectors = []; |
|
| 13 | + private $inflectors = [ ]; |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * @param MethodNameInflector[] $inflectors |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | public function __construct(array $inflectors) |
| 19 | 19 | { |
| 20 | 20 | array_walk($inflectors, function (MethodNameInflector $inflector) { |
| 21 | - $this->inflectors[] = $inflector; |
|
| 21 | + $this->inflectors[ ] = $inflector; |
|
| 22 | 22 | }); |
| 23 | 23 | } |
| 24 | 24 | |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | { |
| 27 | 27 | foreach ($this->inflectors as $inflector) { |
| 28 | 28 | $methodName = $inflector->inflect($command, $handler); |
| 29 | - if (is_callable([$handler, $methodName])) { |
|
| 29 | + if (is_callable([ $handler, $methodName ])) { |
|
| 30 | 30 | return $methodName; |
| 31 | 31 | } |
| 32 | 32 | } |
@@ -8,12 +8,12 @@ |
||
| 8 | 8 | /** |
| 9 | 9 | * @var DeciderInterface[] |
| 10 | 10 | */ |
| 11 | - private $deciders = []; |
|
| 11 | + private $deciders = [ ]; |
|
| 12 | 12 | |
| 13 | 13 | public function __construct(array $deciders) |
| 14 | 14 | { |
| 15 | 15 | array_walk($deciders, function (DeciderInterface $decider) { |
| 16 | - $this->deciders[] = $decider; |
|
| 16 | + $this->deciders[ ] = $decider; |
|
| 17 | 17 | }); |
| 18 | 18 | } |
| 19 | 19 | |