@@ -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 | } |
@@ -7,8 +7,8 @@ |
||
| 7 | 7 | namespace TheSportsDb\Entity\Proxy; |
| 8 | 8 | |
| 9 | 9 | use TheSportsDb\Entity\EntityInterface; |
| 10 | -use TheSportsDb\Http\TheSportsDbClientInterface; |
|
| 11 | 10 | use TheSportsDb\Entity\EntityManagerConsumerInterface; |
| 11 | +use TheSportsDb\Http\TheSportsDbClientInterface; |
|
| 12 | 12 | |
| 13 | 13 | /** |
| 14 | 14 | * Interface for proxy objects. |
@@ -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; |
@@ -130,6 +130,7 @@ |
||
| 130 | 130 | |
| 131 | 131 | /** |
| 132 | 132 | * {@inheritdoc} |
| 133 | + * @param string $entityType |
|
| 133 | 134 | */ |
| 134 | 135 | public function getPropertyMapDefinition($entityType) { |
| 135 | 136 | if (!isset($this->propertyMapDefinitions[$entityType])) { |
@@ -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 | } |
@@ -431,7 +431,7 @@ discard block |
||
| 431 | 431 | * @param type $value |
| 432 | 432 | * @param type $context |
| 433 | 433 | * @param EntityManagerInterface $entityManager |
| 434 | - * @return type |
|
| 434 | + * @return EntityInterface |
|
| 435 | 435 | */ |
| 436 | 436 | public static function transformLeague($value, $context, EntityManagerInterface $entityManager) { |
| 437 | 437 | return static::transform($value, $context, $entityManager, 'league', 'idLeague', array('strLeague' => 'strLeague')); |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | * @param type $value |
| 458 | 458 | * @param type $context |
| 459 | 459 | * @param EntityManagerInterface $entityManager |
| 460 | - * @return type |
|
| 460 | + * @return EntityInterface |
|
| 461 | 461 | */ |
| 462 | 462 | public static function transformHomeTeam($value, $context, EntityManagerInterface $entityManager) { |
| 463 | 463 | return static::transform($value, $context, $entityManager, 'team', 'idTeam', array('strHomeTeam' => 'strTeam')); |
@@ -468,7 +468,7 @@ discard block |
||
| 468 | 468 | * @param type $value |
| 469 | 469 | * @param type $context |
| 470 | 470 | * @param EntityManagerInterface $entityManager |
| 471 | - * @return type |
|
| 471 | + * @return EntityInterface |
|
| 472 | 472 | */ |
| 473 | 473 | public static function transformAwayTeam($value, $context, EntityManagerInterface $entityManager) { |
| 474 | 474 | return static::transform($value, $context, $entityManager, 'team', 'idTeam', array('strAwayTeam' => 'strTeam')); |
@@ -243,7 +243,7 @@ |
||
| 243 | 243 | * @param type $value |
| 244 | 244 | * @param type $context |
| 245 | 245 | * @param EntityManagerInterface $entityManager |
| 246 | - * @return type |
|
| 246 | + * @return EntityInterface |
|
| 247 | 247 | */ |
| 248 | 248 | public static function transformSport($value, $context, EntityManagerInterface $entityManager) { |
| 249 | 249 | return static::transform($value, $context, $entityManager, 'sport', 'strSport'); |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | * @param type $value |
| 73 | 73 | * @param type $context |
| 74 | 74 | * @param EntityManagerInterface $entityManager |
| 75 | - * @return type |
|
| 75 | + * @return EntityInterface |
|
| 76 | 76 | */ |
| 77 | 77 | public static function transformLeague($value, $context, EntityManagerInterface $entityManager) { |
| 78 | 78 | return static::transform($value, $context, $entityManager, 'league', 'idLeague', array('strLeague' => 'strLeague')); |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * |
| 98 | 98 | * @param type $value |
| 99 | 99 | * @param type $context |
| 100 | - * @return type |
|
| 100 | + * @return string |
|
| 101 | 101 | */ |
| 102 | 102 | public static function transformId($value, $context) { |
| 103 | 103 | return $value . '|' . $context->idLeague; |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | * @param type $value |
| 318 | 318 | * @param type $context |
| 319 | 319 | * @param EntityManagerInterface $entityManager |
| 320 | - * @return type |
|
| 320 | + * @return EntityInterface |
|
| 321 | 321 | */ |
| 322 | 322 | public static function transformSport($value, $context, EntityManagerInterface $entityManager) { |
| 323 | 323 | return static::transform($value, $context, $entityManager, 'sport', 'strSport'); |
@@ -329,7 +329,7 @@ discard block |
||
| 329 | 329 | * @param type $value |
| 330 | 330 | * @param type $context |
| 331 | 331 | * @param EntityManagerInterface $entityManager |
| 332 | - * @return type |
|
| 332 | + * @return EntityInterface |
|
| 333 | 333 | */ |
| 334 | 334 | public static function transformLeague($value, $context, EntityManagerInterface $entityManager) { |
| 335 | 335 | return static::transform($value, $context, $entityManager, 'league', 'idLeague', array('strLeague' => 'strLeague')); |