Passed
Branch master (76cc2e)
by Paweł
03:12
created
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.