1 | <?php |
||
22 | class DispatchingEntityLookup implements ItemLookup, PropertyLookup, EntityLookup, EntityDocumentLookup { |
||
23 | |||
24 | /** |
||
25 | * @var EntityDocumentLookup |
||
26 | */ |
||
27 | private $entityDocumentLookup; |
||
28 | |||
29 | /** |
||
30 | * @param EntityDocumentLookup $entityDocumentLookup |
||
31 | */ |
||
32 | 11 | public function __construct( EntityDocumentLookup $entityDocumentLookup ) { |
|
35 | |||
36 | /** |
||
37 | * @see EntityLookup:getEntity |
||
38 | */ |
||
39 | public function getEntity( EntityId $entityId ) { |
||
42 | |||
43 | /** |
||
44 | * @see EntityLookup:hasEntity |
||
45 | */ |
||
46 | public function hasEntity( EntityId $entityId ) { |
||
49 | |||
50 | /** |
||
51 | * @see EntityDocumentLookup:getEntityDocumentForId |
||
52 | */ |
||
53 | 4 | public function getEntityDocumentForId( EntityId $entityId ) { |
|
56 | |||
57 | /** |
||
58 | * @see EntityDocumentLookup:getEntityDocumentsForIds |
||
59 | */ |
||
60 | 3 | public function getEntityDocumentsForIds( array $entityIds ) { |
|
63 | |||
64 | /** |
||
65 | * @see ItemLookup::getItemForId |
||
66 | */ |
||
67 | 4 | public function getItemForId( ItemId $itemId ) { |
|
74 | |||
75 | /** |
||
76 | * @see PropertyLookup::getPropertyForId |
||
77 | */ |
||
78 | 3 | public function getPropertyForId( PropertyId $propertyId ) { |
|
85 | } |
||
86 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.