Passed
Push — master ( d30360...5bda1f )
by Paweł
02:50
created
src/Build/LevelProgress.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 
71 71
     private function getRequiredExperience(Level $level): Experience
72 72
     {
73
-        return match (true) {
73
+        return match(true) {
74 74
             $level->isGreaterThan(new Level(10)) => new Experience(2000),
75 75
             $level->isGreaterThan(new Level(20)) => new Experience(3000),
76 76
             default => new Experience(1000),
Please login to merge, or discard this patch.
src/Build/Talent/WeaponMastery/WeaponMasteryLevel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 
55 55
     public function __toString(): string
56 56
     {
57
-        return match ($this->value) {
57
+        return match($this->value) {
58 58
             self::INEXPERIENCED => 'inexperienced',
59 59
             self::NOVICE => 'novice',
60 60
             self::WARRIOR => 'warrior',
Please login to merge, or discard this patch.
src/Build/Talent/TalentCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
     public function findWeaponMasteryForWeaponType(WeaponType $weaponType): ?WeaponMastery
15 15
     {
16 16
         return $this->filter(
17
-            static fn(Talent $talent): bool =>
17
+            static fn(Talent $talent) : bool =>
18 18
                 $talent instanceof WeaponMastery && $talent->getType()->equals($weaponType),
19 19
         )->getIterator()->current();
20 20
     }
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function findSecretKnowledge(): ?SecretKnowledge
23 23
     {
24 24
         return $this->filter(
25
-            static fn(Talent $talent): bool => $talent instanceof SecretKnowledge,
25
+            static fn(Talent $talent) : bool => $talent instanceof SecretKnowledge,
26 26
         )->getIterator()->current();
27 27
     }
28 28
 
Please login to merge, or discard this patch.
src/Build/Talent/SecretKnowledge/Ascension.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
     public function getRequiredEtherum(): Etherum
63 63
     {
64
-        return match ($this->value) {
64
+        return match($this->value) {
65 65
             self::FIRST_ASCENSION => new Etherum(1),
66 66
             self::SECOND_ASCENSION => new Etherum(2),
67 67
             self::THIRD_ASCENSION => new Etherum(4),
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     public function __toString(): string
78 78
     {
79
-        return match ($this->value) {
79
+        return match($this->value) {
80 80
             self::FIRST_ASCENSION => 'First Ascension',
81 81
             self::SECOND_ASCENSION => 'Second Ascension',
82 82
             self::THIRD_ASCENSION => 'Third Ascension',
Please login to merge, or discard this patch.
src/Player/Player.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
             return;
67 67
         }
68 68
 
69
-        $playerAscension = $this->talentCollection->findSecretKnowledge()?->getAscension()
69
+        $playerAscension = $this->talentCollection->findSecretKnowledge() ? ->getAscension()
70 70
             ?? throw PlayerException::etherumOverdose();
71 71
 
72 72
         $corruptionBoundary = $this->calculateCorruptionBoundary();
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     private function calculateCorruptionBoundary(): Etherum
94 94
     {
95
-        $ascension = $this->talentCollection->findSecretKnowledge()?->getAscension();
95
+        $ascension = $this->talentCollection->findSecretKnowledge() ? ->getAscension();
96 96
         if ($ascension === null) {
97 97
             return new Etherum(2);
98 98
         }
Please login to merge, or discard this patch.
src/Infrastructure/GameKernel.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,10 +37,10 @@
 block discarded – undo
37 37
         $this->container = new ContainerBuilder();
38 38
         $loader = new YamlFileLoader(
39 39
             $this->container,
40
-            new FileLocator(dirname(__DIR__, 2) . '/config'),
40
+            new FileLocator(dirname(__DIR__, 2).'/config'),
41 41
         );
42 42
 
43
-        $loader->load(match ($this->environment) {
43
+        $loader->load(match($this->environment) {
44 44
             'test' => 'services_test.yaml',
45 45
             'prod' => 'services.yaml',
46 46
             default => throw GameKernelException::unknownEnvironment($this->environment),
Please login to merge, or discard this patch.
src/Infrastructure/Persistence/DenormalizePlayer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
             static function(array $talent): Talent {
55 55
                 $reflection = new \ReflectionClass($talent['className']);
56 56
 
57
-                $talent = match ($talent['className']) {
57
+                $talent = match($talent['className']) {
58 58
                     WeaponMastery::class =>
59 59
                         $reflection->newInstance(
60 60
                             new WeaponType($talent['type']),
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         $reflection = new \ReflectionClass($data['className']);
79 79
 
80
-        $weapon = match (true) {
80
+        $weapon = match(true) {
81 81
             in_array(RebredirWeapon::class, $reflection->getTraitNames()) =>
82 82
                 $reflection->newInstance(new Etherum($data['etherumLoad'])),
83 83
             default => $reflection->newInstance(),
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
             static function(array $item): InventoryItem {
95 95
                 $reflection = new \ReflectionClass($item['className']);
96 96
 
97
-                $item = match (true) {
97
+                $item = match(true) {
98 98
                     $reflection->isSubclassOf(Weapon::class) => self::denormalizeWeapon($item),
99 99
                     default => $reflection->newInstance(),
100 100
                 };
Please login to merge, or discard this patch.
src/Infrastructure/Persistence/NormalizePlayer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             static function(Talent $talent): array {
44 44
                 $data = ['className' => get_class($talent)];
45 45
 
46
-                return match (true) {
46
+                return match(true) {
47 47
                     $talent instanceof SecretKnowledge => array_merge($data, [
48 48
                         'ascension' => $talent->getAscension()->get(),
49 49
                     ]),
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
     {
75 75
         return map(
76 76
             static function(InventoryItem $inventoryItem): array {
77
-                return match (true) {
77
+                return match(true) {
78 78
                     $inventoryItem instanceof Weapon => self::normalizeWeapon($inventoryItem),
79 79
                     default => ['className' => get_class($inventoryItem)],
80 80
                 };
Please login to merge, or discard this patch.
src/Infrastructure/Cli/PlayerIO.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
         return $this->io->confirm($question);
40 40
     }
41 41
 
42
-    public function tell(string|array $message): void
42
+    public function tell(string | array $message): void
43 43
     {
44 44
         sleep(1);
45 45
         $this->io->text($message);
Please login to merge, or discard this patch.