Passed
Branch master (76cc2e)
by Paweł
03:12
created
src/Entity/Entity.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
 
97 97
     protected function calculateCorruptionBoundary(): Etherum
98 98
     {
99
-        $ascension = $this->talentCollection->findSecretKnowledge()?->getAscension();
99
+        $ascension = $this->talentCollection->findSecretKnowledge() ? ->getAscension();
100 100
         if ($ascension === null) {
101 101
             return new Etherum(2);
102 102
         }
Please login to merge, or discard this patch.
src/Player/Player.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@
 block discarded – undo
141 141
     {
142 142
         $this->etherum->increaseBy($etherum);
143 143
 
144
-        $playerAscension = $this->talentCollection->findSecretKnowledge()?->getAscension()
144
+        $playerAscension = $this->talentCollection->findSecretKnowledge() ? ->getAscension()
145 145
             ?? throw PlayerException::etherumOverdose();
146 146
 
147 147
         $corruptionBoundary = $this->calculateCorruptionBoundary();
Please login to merge, or discard this patch.
src/Fight/Fight.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
         );
80 80
     }
81 81
 
82
-    private function askForPlayerAction(PlayerAction $playerAction): Attack|Consumable
82
+    private function askForPlayerAction(PlayerAction $playerAction): Attack | Consumable
83 83
     {
84 84
         $action = $playerAction->askForChoice(
85 85
             'Select action',
@@ -101,9 +101,9 @@  discard block
 block discarded – undo
101 101
     }
102 102
 
103 103
     private function validatePlayerAction(
104
-        Attack|Consumable $action,
104
+        Attack | Consumable $action,
105 105
         PlayerAction $playerAction,
106
-    ): Attack|Consumable {
106
+    ): Attack | Consumable {
107 107
         if ($action instanceof MeleeAttack && $this->player->hasWeapon() === false) {
108 108
             $playerAction->note('This attack requires weapon equipped.');
109 109
             return $this->askForPlayerAction($playerAction);
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 
120 120
     private function findOpponent(Fighter $fighter, PlayerAction $playerAction): Fighter
121 121
     {
122
-        return match (true) {
122
+        return match(true) {
123 123
             $fighter instanceof Player && $this->opponents->count() > 1
124 124
                 => $playerAction->askForChoice('Select opponent to attack', $this->opponents->getItems()),
125 125
             $fighter instanceof Player => $this->opponents->first(),
Please login to merge, or discard this patch.
src/Entity/Corruption.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
 
27 27
     public function __toString(): string
28 28
     {
29
-        return match ($this->value) {
29
+        return match($this->value) {
30 30
             1 => 'low',
31 31
             2 => 'medium',
32 32
             3 => 'high',
Please login to merge, or discard this patch.
src/Infrastructure/Persistence/NormalizePlayer.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
             'talents' => self::normalizeTalents($player->getTalents()),
29 29
             'inventory' => self::normalizeInventory($player->getInventory()),
30 30
             'weapon' => $player->getWeapon() !== null ? self::normalizeWeapon($player->getWeapon()) : null,
31
-            'corruption' => $player->getCorruption()?->get(),
31
+            'corruption' => $player->getCorruption() ? ->get(),
32 32
             'levelProgress' => [
33 33
                 'level' => $player->getLevelProgress()->getLevel()->get(),
34 34
                 'currentExperience' => $player->getLevelProgress()->getCurrentExperience()->get(),
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
             static function(Talent $talent): array {
47 47
                 $data = ['className' => get_class($talent)];
48 48
 
49
-                return match (true) {
49
+                return match(true) {
50 50
                     $talent instanceof SecretKnowledge => array_merge($data, [
51 51
                         'ascension' => $talent->getAscension()->get(),
52 52
                     ]),
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
     {
66 66
         $data = ['className' => get_class($weapon)];
67 67
 
68
-        return match (true) {
68
+        return match(true) {
69 69
             $weapon instanceof RebredirWeapon => array_merge($data, [
70 70
                 'etherumLoad' => $weapon->getEtherumLoad()->get(),
71 71
             ]),
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         return map(
79 79
             static function(InventoryItem $inventoryItem): array {
80
-                return match (true) {
80
+                return match(true) {
81 81
                     $inventoryItem instanceof Weapon => self::normalizeWeapon($inventoryItem),
82 82
                     default => ['className' => get_class($inventoryItem)],
83 83
                 };
Please login to merge, or discard this patch.