| @@ -70,11 +70,11 @@ discard block | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | ||
| 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 | } | 
| @@ -84,7 +84,7 @@ | ||
| 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(), | 
| @@ -151,14 +151,14 @@ | ||
| 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()) { | 
| @@ -24,13 +24,13 @@ | ||
| 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() |