Passed
Push — master ( a47581...085587 )
by Paweł
05:58
created
src/Infrastructure/Persistence/DenormalizePlayer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
             static function(array $talent): Talent {
58 58
                 $reflection = new \ReflectionClass($talent['className']);
59 59
 
60
-                $talent = match ($talent['className']) {
60
+                $talent = match($talent['className']) {
61 61
                     WeaponMastery::class =>
62 62
                         $reflection->newInstance(
63 63
                             new WeaponType($talent['type']),
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
     {
81 81
         $reflection = new \ReflectionClass($data['className']);
82 82
 
83
-        $weapon = match (true) {
83
+        $weapon = match(true) {
84 84
             $reflection->isSubclassOf(RebredirWeapon::class) =>
85 85
                 $reflection->newInstance(new Etherum($data['etherumLoad'])),
86 86
             default => $reflection->newInstance(),
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             static function(array $item): InventoryItem {
98 98
                 $reflection = new \ReflectionClass($item['className']);
99 99
 
100
-                $item = match (true) {
100
+                $item = match(true) {
101 101
                     $reflection->isSubclassOf(Weapon::class) => self::denormalizeWeapon($item),
102 102
                     default => $reflection->newInstance(),
103 103
                 };
Please login to merge, or discard this patch.
src/Infrastructure/Persistence/NormalizePlayer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
             static function(Talent $talent): array {
46 46
                 $data = ['className' => get_class($talent)];
47 47
 
48
-                return match (true) {
48
+                return match(true) {
49 49
                     $talent instanceof SecretKnowledge => array_merge($data, [
50 50
                         'ascension' => $talent->getAscension()->get(),
51 51
                     ]),
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     {
65 65
         $data = ['className' => $className = get_class($weapon)];
66 66
 
67
-        return match (true) {
67
+        return match(true) {
68 68
             $weapon instanceof RebredirWeapon => array_merge($data, [
69 69
                 'etherumLoad' => $weapon->getEtherumLoad()->get(),
70 70
             ]),
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     {
77 77
         return map(
78 78
             static function(InventoryItem $inventoryItem): array {
79
-                return match (true) {
79
+                return match(true) {
80 80
                     $inventoryItem instanceof Weapon => self::normalizeWeapon($inventoryItem),
81 81
                     default => ['className' => get_class($inventoryItem)],
82 82
                 };
Please login to merge, or discard this patch.