Completed
Branch master (c2c95f)
by Jérémy
03:36
created
Category
src/Entities/Pokemon.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
      * Return the minimum of perfection of a Pokemon
71 71
      * @return IvCombinaison|null
72 72
      */
73
-    public function getMinimumCombinaison(): ?IvCombinaison
73
+    public function getMinimumCombinaison(): ? IvCombinaison
74 74
     {
75 75
         return $this->getIvCombinaisons()
76 76
             ->sortBy(
77
-                function (IvCombinaison $combinaison) {
77
+                function(IvCombinaison $combinaison) {
78 78
                     return $combinaison->getPerfection();
79 79
                 })
80 80
             ->last();
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
      * Return the maximum of perfection of a Pokemon
85 85
      * @return IvCombinaison|null
86 86
      */
87
-    public function getMaximumCombinaison(): ?IvCombinaison
87
+    public function getMaximumCombinaison(): ? IvCombinaison
88 88
     {
89 89
         return $this->getIvCombinaisons()
90 90
             ->sortBy(
91
-                function (IvCombinaison $combinaison) {
91
+                function(IvCombinaison $combinaison) {
92 92
                     return $combinaison->getPerfection();
93 93
                 })
94 94
             ->first();
@@ -98,10 +98,10 @@  discard block
 block discarded – undo
98 98
      * Return the average perfection of a Pokemon
99 99
      * @return float|null
100 100
      */
101
-    public function getAveragePerfection(): ?float
101
+    public function getAveragePerfection(): ? float
102 102
     {
103 103
         return $this->getIvCombinaisons()->average(
104
-            function (IvCombinaison $combinaison) {
104
+            function(IvCombinaison $combinaison) {
105 105
                 return $combinaison->getPerfection();
106 106
             });
107 107
     }
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
      *
146 146
      * @return int|null
147 147
      */
148
-    public function getCp(): ?int
148
+    public function getCp(): ? int
149 149
     {
150 150
         return $this->cp;
151 151
     }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
      *
169 169
      * @return int|null
170 170
      */
171
-    public function getHp(): ?int
171
+    public function getHp(): ? int
172 172
     {
173 173
         return $this->hp;
174 174
     }
Please login to merge, or discard this patch.
src/Commands/CalculateCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 
85 85
         (new Table($output))
86 86
             ->setHeaders(['Level', 'Attack IV', 'Defense IV', 'Stamina IV', 'Perfection'])
87
-            ->setRows($pokemon->getIvCombinaisons()->map(function (IvCombinaison $combinaison) {
87
+            ->setRows($pokemon->getIvCombinaisons()->map(function(IvCombinaison $combinaison) {
88 88
                 return [
89 89
                     $combinaison->getLevel()->getLevel(),
90 90
                     $combinaison->getAttack(),
Please login to merge, or discard this patch.
src/Calculator/Calculator.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -151,14 +151,14 @@
 block discarded – undo
151 151
     {
152 152
         $this->potentialCombinaisons = $this->potentialCombinaisons
153 153
             // Eliminate impossible combinaison for global combinaison
154
-            ->filter(function ($combinaison) use ($global) {
154
+            ->filter(function($combinaison) use ($global) {
155 155
                 if ($combinaison->getTotal() < $this->getMaxGlobalEvaluation($global)) {
156 156
                     return true;
157 157
                 }
158 158
                 return false;
159 159
             })
160 160
             // Eliminate impossible combinaisons with best stats
161
-            ->filter(function ($combinaison) use ($bestStats) {
161
+            ->filter(function($combinaison) use ($bestStats) {
162 162
                 $nonBestStats = array_diff(self::AVAILABLE_OPTIONS, $bestStats);
163 163
                 foreach ($nonBestStats as $nonBestStat) {
164 164
                     if ($combinaison->getAbbreviated($nonBestStat) < $combinaison->getMaximalIv()) {
Please login to merge, or discard this patch.
src/Extractors/Pokedex.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@
 block discarded – undo
24 24
         $collection = $this->getGameMasterJsonCollection();
25 25
 
26 26
         $finded = $collection
27
-            ->filter(function ($line) {
27
+            ->filter(function($line) {
28 28
                 if (isset($line->pokemonSettings)) {
29 29
                     return true;
30 30
                 }
31 31
                 return false;
32 32
             })
33
-            ->filter(function ($line) use ($name) {
33
+            ->filter(function($line) use ($name) {
34 34
                 return $line->pokemonSettings->pokemonId === strtoupper($name);
35 35
             })
36 36
             ->first()
Please login to merge, or discard this patch.