@@ -22,35 +22,35 @@ discard block |
||
22 | 22 | |
23 | 23 | public function inHand(): Cards |
24 | 24 | { |
25 | - return $this->filterBy(static function (Card $card): bool { |
|
25 | + return $this->filterBy(static function(Card $card): bool { |
|
26 | 26 | return $card->isInHand(); |
27 | 27 | }); |
28 | 28 | } |
29 | 29 | |
30 | 30 | public function inPlay(): Cards |
31 | 31 | { |
32 | - return $this->filterBy(static function (Card $card): bool { |
|
32 | + return $this->filterBy(static function(Card $card): bool { |
|
33 | 33 | return $card->isInPlay(); |
34 | 34 | }); |
35 | 35 | } |
36 | 36 | |
37 | 37 | public function thatAttack(): Cards |
38 | 38 | { |
39 | - return $this->filterBy(static function (Card $card): bool { |
|
39 | + return $this->filterBy(static function(Card $card): bool { |
|
40 | 40 | return $card->isAttacking(); |
41 | 41 | }); |
42 | 42 | } |
43 | 43 | |
44 | 44 | public function thatDefend(): Cards |
45 | 45 | { |
46 | - return $this->filterBy(static function (Card $card): bool { |
|
46 | + return $this->filterBy(static function(Card $card): bool { |
|
47 | 47 | return $card->isDefending(); |
48 | 48 | }); |
49 | 49 | } |
50 | 50 | |
51 | 51 | private function inDeck(): Cards |
52 | 52 | { |
53 | - return $this->filterBy(static function (Card $card): bool { |
|
53 | + return $this->filterBy(static function(Card $card): bool { |
|
54 | 54 | return $card->isInDeck(); |
55 | 55 | }); |
56 | 56 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | public function theOneThatAttacksTheAmbushOf(Card $defender): Card |
64 | 64 | { |
65 | - return $this->filterBy(static function (Card $card) use ($defender): bool { |
|
65 | + return $this->filterBy(static function(Card $card) use ($defender): bool { |
|
66 | 66 | return $card->isAttackingThe($defender); |
67 | 67 | })[0]; |
68 | 68 | } |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | { |
72 | 72 | return array_reduce( |
73 | 73 | $this->items(), |
74 | - static function (?Card $topmost, Card $card): ?Card { |
|
74 | + static function(?Card $topmost, Card $card): ?Card { |
|
75 | 75 | if ($topmost === null || $card->hasHigherPositionThan($topmost)) { |
76 | 76 | return $card; |
77 | 77 | } |