@@ -23,28 +23,28 @@ discard block |
||
23 | 23 | |
24 | 24 | public function inHand(): Cards |
25 | 25 | { |
26 | - return $this->filterBy(static function (Card $card): bool { |
|
26 | + return $this->filterBy(static function(Card $card): bool { |
|
27 | 27 | return $card->isInHand(); |
28 | 28 | }); |
29 | 29 | } |
30 | 30 | |
31 | 31 | public function inPlay(): Cards |
32 | 32 | { |
33 | - return $this->filterBy(static function (Card $card): bool { |
|
33 | + return $this->filterBy(static function(Card $card): bool { |
|
34 | 34 | return $card->isInPlay(); |
35 | 35 | }); |
36 | 36 | } |
37 | 37 | |
38 | 38 | public function thatAttack(): Cards |
39 | 39 | { |
40 | - return $this->filterBy(static function (Card $card): bool { |
|
40 | + return $this->filterBy(static function(Card $card): bool { |
|
41 | 41 | return $card->isAttacking(); |
42 | 42 | }); |
43 | 43 | } |
44 | 44 | |
45 | 45 | public function thatDefend(): Cards |
46 | 46 | { |
47 | - return $this->filterBy(static function (Card $card): bool { |
|
47 | + return $this->filterBy(static function(Card $card): bool { |
|
48 | 48 | return $card->isDefending(); |
49 | 49 | }); |
50 | 50 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | |
57 | 57 | public function theOneThatAttacksTheAmbushOf(Card $defender): Card |
58 | 58 | { |
59 | - return $this->filterBy(static function (Card $card) use ($defender): bool { |
|
59 | + return $this->filterBy(static function(Card $card) use ($defender): bool { |
|
60 | 60 | return $card->isAttackingThe($defender); |
61 | 61 | })[0]; |
62 | 62 | } |
@@ -64,10 +64,10 @@ discard block |
||
64 | 64 | private function topMostCardInDeck(): Card |
65 | 65 | { |
66 | 66 | return array_reduce( |
67 | - array_filter($this->items(), static function (Card $card): bool { |
|
67 | + array_filter($this->items(), static function(Card $card): bool { |
|
68 | 68 | return $card->isInDeck(); |
69 | 69 | }), |
70 | - static function (?Card $topmost, Card $card): ?Card { |
|
70 | + static function(?Card $topmost, Card $card): ?Card { |
|
71 | 71 | if ($topmost === null || $card->hasHigherPositionThan($topmost)) { |
72 | 72 | return $card; |
73 | 73 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | { |
21 | 21 | $this->cards[$match->id()][$owner] = array_filter( |
22 | 22 | $this->cards[$match->id()][$owner], |
23 | - static function (Card $card) use ($cardToRemove): bool { |
|
23 | + static function(Card $card) use ($cardToRemove): bool { |
|
24 | 24 | return $card->offset() !== $cardToRemove; |
25 | 25 | } |
26 | 26 | ); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | { |
60 | 60 | return array_filter( |
61 | 61 | $this->cardsInPlay($match), |
62 | - static function (Card $card): bool { |
|
62 | + static function(Card $card): bool { |
|
63 | 63 | return $card->isAttacking(); |
64 | 64 | } |
65 | 65 | ); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | { |
70 | 70 | return current(array_filter( |
71 | 71 | $this->cardsInPlayFor($player, $match), |
72 | - static function (Card $card) use ($offset): bool { |
|
72 | + static function(Card $card) use ($offset): bool { |
|
73 | 73 | return $card->offset() === $offset; |
74 | 74 | } |
75 | 75 | )); |
@@ -9,7 +9,7 @@ |
||
9 | 9 | private $errorMessages = []; |
10 | 10 | |
11 | 11 | /** @return string[] */ |
12 | - public function for(CorrelationId $request): array |
|
12 | + public function for (CorrelationId $request): array |
|
13 | 13 | { |
14 | 14 | return $this->errorMessages[$request->id()] ?? []; |
15 | 15 | } |