Conditions | 5 |
Paths | 6 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5.0342 |
Changes | 0 |
1 | <?php |
||
16 | 2 | public function qualifyBiom(Map $map): Biom |
|
17 | { |
||
18 | 2 | $locationsAreSame = true; |
|
19 | |||
20 | 2 | $firstBiom = $map->first()->getBiom(); |
|
21 | /** @var Location $location */ |
||
22 | 2 | foreach ($map->toArray() as $location) { |
|
23 | 2 | if (!$location->getBiom()->equals($firstBiom)) { |
|
24 | 2 | $locationsAreSame = false; |
|
25 | } |
||
26 | } |
||
27 | |||
28 | 2 | if ($map->count() == 8 && $locationsAreSame) { |
|
29 | 2 | return $firstBiom; |
|
30 | } |
||
31 | |||
32 | throw new UnimplementedException(); |
||
33 | } |
||
34 | } |
||
35 |