1 | <?php |
||
14 | class Out extends Stage |
||
15 | { |
||
16 | /** @var DocumentManager */ |
||
17 | private $dm; |
||
18 | |||
19 | /** @var string */ |
||
20 | private $collection; |
||
21 | |||
22 | 6 | public function __construct(Builder $builder, string $collection, DocumentManager $documentManager) |
|
29 | |||
30 | /** |
||
31 | * {@inheritdoc} |
||
32 | */ |
||
33 | 5 | public function getExpression() : array |
|
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 6 | public function out(string $collection) : Stage\Out |
|
55 | |||
56 | 2 | private function fromDocument(ClassMetadata $classMetadata) : void |
|
64 | } |
||
65 |
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.