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