Conditions | 3 |
Paths | 3 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3.0261 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | 1 | public function getGroups() : array { |
|
28 | 1 | if ($this instanceof \TournamentGenerator\Interfaces\WithRounds) { |
|
29 | 1 | $groups = []; |
|
30 | 1 | foreach ($this->getRounds() as $round) { |
|
31 | 1 | $groups[] = $round->getGroups(); |
|
32 | } |
||
33 | 1 | return array_merge(...$groups); |
|
34 | } |
||
35 | return $this->groups; |
||
36 | } |
||
37 | } |