@@ -11,22 +11,22 @@ discard block |
||
| 11 | 11 | /** |
| 12 | 12 | * @var QueueVoterInterface[] |
| 13 | 13 | */ |
| 14 | - private $voters = []; |
|
| 14 | + private $voters = [ ]; |
|
| 15 | 15 | |
| 16 | 16 | public function __construct(array $voters) |
| 17 | 17 | { |
| 18 | 18 | array_walk($voters, function (QueueVoterInterface $voter) { |
| 19 | - $this->voters[] = $voter; |
|
| 19 | + $this->voters[ ] = $voter; |
|
| 20 | 20 | }); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | public function resolveQueueName($command): string |
| 24 | 24 | { |
| 25 | 25 | $votes = $this->getVotes($command); |
| 26 | - if (!isset($votes[0])) { |
|
| 26 | + if (!isset($votes[ 0 ])) { |
|
| 27 | 27 | throw new QueueResolverException; |
| 28 | 28 | } |
| 29 | - return $votes[0]->getQueueName(); |
|
| 29 | + return $votes[ 0 ]->getQueueName(); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
@@ -35,11 +35,11 @@ discard block |
||
| 35 | 35 | */ |
| 36 | 36 | public function getVotes($command): array |
| 37 | 37 | { |
| 38 | - $votes = []; |
|
| 38 | + $votes = [ ]; |
|
| 39 | 39 | foreach ($this->voters as $voter) { |
| 40 | 40 | $vote = $voter->getVote($command); |
| 41 | 41 | if ($vote instanceof QueueVote) { |
| 42 | - $votes[] = $vote; |
|
| 42 | + $votes[ ] = $vote; |
|
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | usort($votes, function (QueueVote $voteA, QueueVote $voteB) { |