| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 1 | protected function loadEvents() { |
|
| 34 | 1 | $id = explode('|', $this->getId()); |
|
| 35 | 1 | $eventData = $this->sportsDbClient->doRequest('eventsseason.php', array('id' => $this->getLeague()->getId(), 's' => reset($id))); |
|
| 36 | 1 | if (isset($eventData->events)) { |
|
| 37 | 1 | $this->update($this->entityManager->mapProperties((object) array('events' => $eventData->events), $this->getEntityType())); |
|
| 38 | 1 | return; |
|
| 39 | } |
||
| 40 | throw new \Exception('Could not fully load season with id ' . $this->getId() . '.'); |
||
| 41 | } |
||
| 42 | |||
| 72 |