@@ -18,8 +18,7 @@ |
||
| 18 | 18 | $return = $val; |
| 19 | 19 | if (method_exists($val, 'raw')) { |
| 20 | 20 | $return = $val->raw(); |
| 21 | - } |
|
| 22 | - elseif (is_array($val)) { |
|
| 21 | + } elseif (is_array($val)) { |
|
| 23 | 22 | $return = array(); |
| 24 | 23 | foreach ($val as $v) { |
| 25 | 24 | $return[] = method_exists($v, 'raw') ? $v->raw() : $v; |
@@ -25,6 +25,7 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @param \TheSportsDb\Entity\LeagueInterface $league |
| 27 | 27 | * The league to add. |
| 28 | + * @return void |
|
| 28 | 29 | */ |
| 29 | 30 | public function addLeague(LeagueInterface $league); |
| 30 | 31 | } |
@@ -162,7 +162,7 @@ |
||
| 162 | 162 | * @param array $contextPropertyMap |
| 163 | 163 | * Extra properties to map from the context |
| 164 | 164 | * |
| 165 | - * @return array |
|
| 165 | + * @return string |
|
| 166 | 166 | * An array with following keys: |
| 167 | 167 | * - object: The raw data representing the entity. |
| 168 | 168 | * - id: The id of the entity. |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | $data = $this->sportsDbClient->doRequest('all_leagues.php'); |
| 40 | 40 | foreach ($data->leagues as $league) { |
| 41 | 41 | if (!isset($this->repository[$league->strSport])) { |
| 42 | - $factory = $this->entityManager->factory($this->getEntityTypeName()); |
|
| 42 | + $factory = $this->entityManager->factory($this->getEntityTypeName()); |
|
| 43 | 43 | $this->repository[$league->strSport] = $factory->create( |
| 44 | 44 | (object) array('id' => $league->strSport, 'name' => $league->strSport), |
| 45 | 45 | $this->getEntityTypeName() |