1 | <?php |
||
24 | class Reader implements CrawlerInterface |
||
25 | { |
||
26 | /** |
||
27 | * @var DOMDocument |
||
28 | */ |
||
29 | private $document; |
||
30 | |||
31 | /** |
||
32 | * @var DOMXPath |
||
33 | */ |
||
34 | private $xpath; |
||
35 | |||
36 | /** |
||
37 | * @var ElementMap |
||
38 | */ |
||
39 | private $inputMap; |
||
40 | |||
41 | /** |
||
42 | * @param DOMDocument $document |
||
43 | */ |
||
44 | 1 | public function __construct(DOMDocument $document) |
|
52 | |||
53 | /** |
||
54 | * @return DOMDocument |
||
55 | */ |
||
56 | 1 | public function getDocument() |
|
60 | |||
61 | /** |
||
62 | * @return DOMXPath |
||
63 | */ |
||
64 | 1 | public function getXPath() |
|
68 | |||
69 | /** |
||
70 | * @return ElementMap |
||
71 | */ |
||
72 | 1 | public function getInputMap() |
|
76 | |||
77 | /** |
||
78 | * @param string $id |
||
79 | * @throws BadMethodCallException |
||
80 | */ |
||
81 | 3 | public function click($id) |
|
96 | |||
97 | /** |
||
98 | * @param string $id |
||
99 | * @throws BadMethodCallException |
||
100 | */ |
||
101 | 2 | public function select($id) |
|
113 | |||
114 | /** |
||
115 | * @param RequestInterface $input |
||
116 | * @throws BadMethodCallException |
||
117 | */ |
||
118 | 1 | public function sendRequest(RequestInterface $request) |
|
124 | |||
125 | /** |
||
126 | * @param string $url |
||
127 | * @throws BadMethodCallException |
||
128 | */ |
||
129 | 1 | public function open(UriInterface $url) |
|
135 | |||
136 | /** |
||
137 | * @return Psr\Http\Message\UriInterface |
||
138 | */ |
||
139 | 1 | public function getUri() |
|
143 | |||
144 | /** |
||
145 | * @param string $xpath |
||
146 | * @param DOMElement|null $scope |
||
147 | * @return DOMNodeList |
||
148 | */ |
||
149 | 1 | public function query($xpath, DOMElement $scope = null) |
|
153 | |||
154 | /** |
||
155 | * @param string $xpath |
||
156 | * @throws InvalidArgumentException when id not found |
||
157 | * @return DOMElement |
||
158 | */ |
||
159 | 1 | public function getElement($xpath) |
|
171 | |||
172 | /** |
||
173 | * @param string $id |
||
174 | * @throws InvalidArgumentException when id not found |
||
175 | * @return string |
||
176 | */ |
||
177 | 1 | public function getText($id) |
|
183 | |||
184 | /** |
||
185 | * @param string $id |
||
186 | * @throws InvalidArgumentException when id not found |
||
187 | * @return string |
||
188 | */ |
||
189 | 1 | public function getTagName($id) |
|
193 | |||
194 | /** |
||
195 | * @param string $id |
||
196 | * @param string $name |
||
197 | * @throws InvalidArgumentException when id not found |
||
198 | * @return string |
||
199 | */ |
||
200 | 1 | public function getAttribute($id, $name) |
|
204 | |||
205 | /** |
||
206 | * @param string $id |
||
207 | * @throws InvalidArgumentException when id not found |
||
208 | * @return string |
||
209 | */ |
||
210 | 1 | public function getHtml($id) |
|
214 | |||
215 | /** |
||
216 | * @return string |
||
217 | */ |
||
218 | 1 | public function getFullHtml() |
|
222 | |||
223 | /** |
||
224 | * @param string $id |
||
225 | * @throws InvalidArgumentException when id not found |
||
226 | * @return boolean |
||
227 | */ |
||
228 | 3 | public function isVisible($id) |
|
246 | |||
247 | /** |
||
248 | * @param string $id |
||
249 | * @throws InvalidArgumentException when id not found |
||
250 | * @return boolean |
||
251 | */ |
||
252 | 4 | public function isSelected($id) |
|
256 | |||
257 | /** |
||
258 | * @param string $id |
||
259 | * @throws InvalidArgumentException when id not found |
||
260 | * @return boolean |
||
261 | */ |
||
262 | 6 | public function isChecked($id) |
|
266 | |||
267 | /** |
||
268 | * @param DOMElement $element |
||
269 | * @throws InvalidArgumentException when id not found |
||
270 | * @return Element\AbstractElement |
||
271 | */ |
||
272 | 9 | public function getInput(DOMElement $element) |
|
276 | |||
277 | /** |
||
278 | * @param string $id |
||
279 | * @throws InvalidArgumentException when id not found |
||
280 | * @return mixed |
||
281 | */ |
||
282 | 1 | public function getValue($id) |
|
286 | |||
287 | /** |
||
288 | * @param string $id |
||
289 | * @param string $value |
||
290 | * @throws InvalidArgumentException when id not found |
||
291 | */ |
||
292 | 1 | public function setValue($id, $value) |
|
300 | |||
301 | /** |
||
302 | * @param AbstractQuery $query |
||
303 | * @param string $parent |
||
304 | * @return array |
||
305 | */ |
||
306 | 1 | public function queryIds(AbstractQuery $query, $parent = null) |
|
318 | } |
||
319 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..