@@ -90,6 +90,10 @@ |
||
90 | 90 | return $reversedEntities; |
91 | 91 | } |
92 | 92 | |
93 | + /** |
|
94 | + * @param string $entityType |
|
95 | + * @param string $idName |
|
96 | + */ |
|
93 | 97 | public static function transform($value, $context, EntityManagerInterface $entityManager, $entityType, $idName, array $contextPropertyMap = array()) { |
94 | 98 | $data = static::transformHelper($value, $context, $idName, $contextPropertyMap); |
95 | 99 | $entity = $entityManager->repository($entityType)->byId($data['id']); |
@@ -220,7 +220,8 @@ |
||
220 | 220 | /** |
221 | 221 | * Gets the property map. |
222 | 222 | * |
223 | - * @return FastNorth\PropertyMapper\Map |
|
223 | + * @param string $entityType |
|
224 | + * @return \FastNorth\PropertyMapper\MapInterface |
|
224 | 225 | * The property map. |
225 | 226 | */ |
226 | 227 | protected function getPropertyMap($entityType) { |
@@ -32,16 +32,10 @@ discard block |
||
32 | 32 | /** |
33 | 33 | * Creates a \TheSportsDb\Facotory\Factory object. |
34 | 34 | * |
35 | - * @param TheSportsDb\Http\TheSportsDbClientInterface $sportsDbClient |
|
35 | + * @param TheSportsDbClientInterface $sportsDbClient |
|
36 | 36 | * The sports db client to make the requests. |
37 | - * @param string $realClass |
|
38 | - * The fully qualified classname of the entity to create. |
|
39 | - * @param string $proxyClass |
|
40 | - * The fully qualified classname of the proxy entity to create. |
|
41 | - * @param TheSportsDb\Entity\EntityManagerInterface $entityManager |
|
37 | + * @param EntityManagerInterface $entityManager |
|
42 | 38 | * The factory container. |
43 | - * @param MapperInterface $propertyMapper |
|
44 | - * The property mapper. |
|
45 | 39 | */ |
46 | 40 | public function __construct(TheSportsDbClientInterface $sportsDbClient, EntityManagerInterface $entityManager = NULL) { |
47 | 41 | $this->sportsDbClient = $sportsDbClient; |
@@ -76,6 +70,9 @@ discard block |
||
76 | 70 | return $entity; |
77 | 71 | } |
78 | 72 | |
73 | + /** |
|
74 | + * @param string $entityType |
|
75 | + */ |
|
79 | 76 | public function isFullObject(\stdClass $object, $entityType) { |
80 | 77 | $reflection = new \ReflectionClass($this->entityManager->getClass($entityType)); |
81 | 78 | $defaultProperties = $reflection->getDefaultProperties(); |
@@ -44,10 +44,6 @@ |
||
44 | 44 | * |
45 | 45 | * @param \stdClass $values |
46 | 46 | * The sport data. |
47 | - * @param \TheSportsDb\Http\TheSportsDbClientInterface $sportsDbClient |
|
48 | - * A sports db client |
|
49 | - * @param \TheSportsDb\Entity\Factory\FactoryInterface $factory |
|
50 | - * The sport factory. |
|
51 | 47 | */ |
52 | 48 | public function __construct(\stdClass $values) { |
53 | 49 | $this->properties = new \stdClass(); |
@@ -51,7 +51,7 @@ |
||
51 | 51 | /** |
52 | 52 | * Get a league by id. |
53 | 53 | * |
54 | - * @param int $league_id |
|
54 | + * @param int $leagueId |
|
55 | 55 | * The league id. |
56 | 56 | * |
57 | 57 | * @return \TheSportsDb\Entity\LeagueInterface |
@@ -12,12 +12,22 @@ |
||
12 | 12 | * @author Jelle Sebreghts |
13 | 13 | */ |
14 | 14 | interface EntityInterface { |
15 | + |
|
16 | + /** |
|
17 | + * @return void |
|
18 | + */ |
|
15 | 19 | public function __construct(\stdClass $values); |
16 | 20 | |
21 | + /** |
|
22 | + * @return void |
|
23 | + */ |
|
17 | 24 | public function update(\stdClass $values); |
18 | 25 | |
19 | 26 | public function raw(); |
20 | 27 | |
28 | + /** |
|
29 | + * @return string |
|
30 | + */ |
|
21 | 31 | public static function getEntityType(); |
22 | 32 | |
23 | 33 | public static function getPropertyMapDefinition(); |
@@ -18,6 +18,7 @@ discard block |
||
18 | 18 | * |
19 | 19 | * @param \TheSportsDb\Entity\Factory\FactoryInterface $factory |
20 | 20 | * The factory to add. |
21 | + * @return void |
|
21 | 22 | */ |
22 | 23 | public function addFactory(FactoryInterface $factory, $entityType); |
23 | 24 | |
@@ -35,5 +36,8 @@ discard block |
||
35 | 36 | */ |
36 | 37 | public function getFactory($class); |
37 | 38 | |
39 | + /** |
|
40 | + * @return void |
|
41 | + */ |
|
38 | 42 | public function setDefaultFactory(FactoryInterface $factory); |
39 | 43 | } |
@@ -16,5 +16,9 @@ |
||
16 | 16 | * @author Jelle Sebreghts |
17 | 17 | */ |
18 | 18 | interface ProxyInterface extends EntityInterface, EntityManagerConsumerInterface { |
19 | + |
|
20 | + /** |
|
21 | + * @return void |
|
22 | + */ |
|
19 | 23 | public function setSportsDbClient(TheSportsDbClientInterface $sportsDbClient); |
20 | 24 | } |
@@ -16,8 +16,9 @@ |
||
16 | 16 | /** |
17 | 17 | * Add a repository for a class. |
18 | 18 | * |
19 | - * @param \TheSportsDb\Repository\RepositoryInterface $repository |
|
19 | + * @param RepositoryInterface $repository |
|
20 | 20 | * The repository to add. |
21 | + * @return void |
|
21 | 22 | */ |
22 | 23 | public function addRepository(RepositoryInterface $repository); |
23 | 24 |