1 | <?php |
||
22 | class EntityRepository extends AbstractRepository implements |
||
23 | RepositoryInterface |
||
24 | { |
||
25 | /** |
||
26 | * @var IdentityMapInterface |
||
27 | */ |
||
28 | protected $identityMap; |
||
29 | |||
30 | /** |
||
31 | * Gets an entity by its id |
||
32 | * |
||
33 | * @param mixed $entityId |
||
34 | * |
||
35 | * @return EntityInterface|null |
||
36 | */ |
||
37 | public function get($entityId) |
||
45 | |||
46 | /** |
||
47 | * Sets identity map for this repository |
||
48 | * |
||
49 | * @param IdentityMapInterface $map |
||
50 | * @return $this|self|EntityRepository |
||
51 | */ |
||
52 | public function setIdentityMap(IdentityMapInterface $map) |
||
57 | |||
58 | /** |
||
59 | * Gets identity map for this repository |
||
60 | * |
||
61 | * @return IdentityMapInterface |
||
62 | */ |
||
63 | protected function getIdentityMap() |
||
70 | |||
71 | /** |
||
72 | * Loads entity from database |
||
73 | * |
||
74 | * @param $entityId |
||
75 | * |
||
76 | * @return null|EntityInterface |
||
77 | */ |
||
78 | protected function load($entityId) |
||
96 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: