1 | <?php |
||
33 | class Builder extends BaseBuilder |
||
34 | { |
||
35 | /** |
||
36 | * The DocumentManager instance for this query |
||
37 | * |
||
38 | * @var DocumentManager |
||
39 | */ |
||
40 | private $dm; |
||
41 | |||
42 | /** |
||
43 | * The ClassMetadata instance. |
||
44 | * |
||
45 | * @var \Doctrine\ODM\MongoDB\Mapping\ClassMetadata |
||
46 | */ |
||
47 | private $class; |
||
48 | |||
49 | /** |
||
50 | * @var string |
||
51 | */ |
||
52 | private $hydrationClass; |
||
53 | |||
54 | /** |
||
55 | * Create a new aggregation builder. |
||
56 | * |
||
57 | * @param DocumentManager $dm |
||
58 | * @param string $documentName |
||
59 | */ |
||
60 | 4 | public function __construct(DocumentManager $dm, $documentName) |
|
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | 1 | public function execute($options = array()) |
|
80 | |||
81 | /** |
||
82 | * @param string $className |
||
83 | * |
||
84 | * @return self |
||
85 | */ |
||
86 | 1 | public function hydrate($className) |
|
92 | |||
93 | /** |
||
94 | * @return QueryExpr |
||
95 | */ |
||
96 | 1 | public function matchExpr() |
|
103 | |||
104 | /** |
||
105 | * @return Expr |
||
106 | */ |
||
107 | 2 | public function expr() |
|
111 | |||
112 | /** |
||
113 | * @param BaseCommandCursor $cursor |
||
114 | * |
||
115 | * @return CommandCursor |
||
116 | */ |
||
117 | 1 | protected function prepareCursor(BaseCommandCursor $cursor) |
|
126 | } |
||
127 |
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.