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 | 5 | 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 | 2 | public function matchExpr() |
|
103 | |||
104 | /** |
||
105 | * @return Expr |
||
106 | */ |
||
107 | 3 | public function expr() |
|
111 | |||
112 | /** |
||
113 | * @return Stage\Match |
||
114 | */ |
||
115 | 2 | public function match() |
|
119 | |||
120 | /** |
||
121 | * @param string $from |
||
122 | * @return Stage\Lookup |
||
123 | */ |
||
124 | public function lookup($from) |
||
128 | |||
129 | /** |
||
130 | * {@inheritdoc} |
||
131 | */ |
||
132 | 2 | public function sort($fieldName, $order = null) |
|
137 | |||
138 | /** |
||
139 | * {@inheritdoc} |
||
140 | */ |
||
141 | 2 | public function unwind($fieldName) |
|
146 | |||
147 | /** |
||
148 | * @param BaseCommandCursor $cursor |
||
149 | * |
||
150 | * @return CommandCursor |
||
151 | */ |
||
152 | 1 | protected function prepareCursor(BaseCommandCursor $cursor) |
|
161 | |||
162 | /** |
||
163 | * @return \Doctrine\ODM\MongoDB\Persisters\DocumentPersister |
||
164 | */ |
||
165 | 2 | private function getDocumentPersister() |
|
169 | } |
||
170 |
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.