Conditions | 4 |
Paths | 5 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 4.5923 |
Changes | 0 |
1 | <?php |
||
67 | 1 | public function addLeague(LeagueInterface $league) { |
|
68 | 1 | if ($this->entity) { |
|
69 | $this->entity->addLeague($league); |
||
70 | return; |
||
71 | } |
||
72 | 1 | if (!isset($this->properties->leagues)) { |
|
73 | $this->properties->leagues = array(); |
||
74 | } |
||
75 | 1 | if (!isset($this->properties->leagues[$league->getId()])) { |
|
76 | 1 | $this->properties->leagues[$league->getId()] = $league; |
|
77 | } |
||
78 | 1 | } |
|
79 | |||
81 |