1 | <?php |
||
25 | class Reader implements CrawlerInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var DOMDocument |
||
29 | */ |
||
30 | private $document; |
||
31 | |||
32 | /** |
||
33 | * @var DOMXPath |
||
34 | */ |
||
35 | private $xpath; |
||
36 | |||
37 | /** |
||
38 | * @var ElementMap |
||
39 | */ |
||
40 | private $inputMap; |
||
41 | |||
42 | /** |
||
43 | * @param DOMDocument $document |
||
44 | */ |
||
45 | 1 | public function __construct(DOMDocument $document) |
|
53 | |||
54 | /** |
||
55 | * @param string $content |
||
56 | * @return self |
||
57 | */ |
||
58 | 1 | public function setDocumentContent($content) |
|
65 | |||
66 | /** |
||
67 | * @return DOMDocument |
||
68 | */ |
||
69 | 1 | public function getDocument() |
|
73 | |||
74 | /** |
||
75 | * @return DOMXPath |
||
76 | */ |
||
77 | 1 | public function getXPath() |
|
81 | |||
82 | /** |
||
83 | * @return ElementMap |
||
84 | */ |
||
85 | 1 | public function getInputMap() |
|
89 | |||
90 | /** |
||
91 | * @param string $id |
||
92 | * @throws BadMethodCallException |
||
93 | */ |
||
94 | 3 | public function click($id) |
|
109 | |||
110 | /** |
||
111 | * @param string $id |
||
112 | * @throws BadMethodCallException |
||
113 | */ |
||
114 | 2 | public function select($id) |
|
126 | |||
127 | /** |
||
128 | * @param RequestInterface $input |
||
129 | * @throws BadMethodCallException |
||
130 | */ |
||
131 | 1 | public function sendRequest(RequestInterface $request) |
|
137 | |||
138 | /** |
||
139 | * @param string $url |
||
140 | * @throws BadMethodCallException |
||
141 | */ |
||
142 | 1 | public function open(UriInterface $url) |
|
148 | |||
149 | /** |
||
150 | * @return Psr\Http\Message\UriInterface |
||
151 | */ |
||
152 | 1 | public function getUri() |
|
156 | |||
157 | /** |
||
158 | * @param string $xpath |
||
159 | * @param DOMElement|null $scope |
||
160 | * @return DOMNodeList |
||
161 | */ |
||
162 | 1 | public function query($xpath, DOMElement $scope = null) |
|
166 | |||
167 | /** |
||
168 | * @param string $xpath |
||
169 | * @throws InvalidArgumentException when id not found |
||
170 | * @return DOMElement |
||
171 | */ |
||
172 | 1 | public function getElement($xpath) |
|
184 | |||
185 | /** |
||
186 | * @param string $id |
||
187 | * @throws InvalidArgumentException when id not found |
||
188 | * @return string |
||
189 | */ |
||
190 | 1 | public function getText($id) |
|
196 | |||
197 | /** |
||
198 | * @param string $id |
||
199 | * @throws InvalidArgumentException when id not found |
||
200 | * @return string |
||
201 | */ |
||
202 | 1 | public function getTagName($id) |
|
206 | |||
207 | /** |
||
208 | * @param string $id |
||
209 | * @param string $name |
||
210 | * @throws InvalidArgumentException when id not found |
||
211 | * @return string |
||
212 | */ |
||
213 | 1 | public function getAttribute($id, $name) |
|
217 | |||
218 | /** |
||
219 | * @param string $id |
||
220 | * @throws InvalidArgumentException when id not found |
||
221 | * @return string |
||
222 | */ |
||
223 | 1 | public function getHtml($id) |
|
227 | |||
228 | /** |
||
229 | * @return string |
||
230 | */ |
||
231 | 1 | public function getFullHtml() |
|
235 | |||
236 | /** |
||
237 | * @param string $id |
||
238 | * @throws InvalidArgumentException when id not found |
||
239 | * @return boolean |
||
240 | */ |
||
241 | 3 | public function isVisible($id) |
|
259 | |||
260 | /** |
||
261 | * @param string $id |
||
262 | * @throws InvalidArgumentException when id not found |
||
263 | * @return boolean |
||
264 | */ |
||
265 | 4 | public function isSelected($id) |
|
269 | |||
270 | /** |
||
271 | * @param string $id |
||
272 | * @throws InvalidArgumentException when id not found |
||
273 | * @return boolean |
||
274 | */ |
||
275 | 6 | public function isChecked($id) |
|
279 | |||
280 | /** |
||
281 | * @param DOMElement $element |
||
282 | * @throws InvalidArgumentException when id not found |
||
283 | * @return Element\AbstractElement |
||
284 | */ |
||
285 | 9 | public function getInput(DOMElement $element) |
|
289 | |||
290 | /** |
||
291 | * @param string $id |
||
292 | * @throws InvalidArgumentException when id not found |
||
293 | * @return mixed |
||
294 | */ |
||
295 | 1 | public function getValue($id) |
|
299 | |||
300 | /** |
||
301 | * @param string $id |
||
302 | * @param string $value |
||
303 | * @throws InvalidArgumentException when id not found |
||
304 | */ |
||
305 | 1 | public function setValue($id, $value) |
|
313 | |||
314 | /** |
||
315 | * @param string $id |
||
316 | * @param string $file |
||
317 | * @throws InvalidArgumentException when id not found or not a file |
||
318 | */ |
||
319 | 2 | public function setFile($id, $file) |
|
333 | |||
334 | /** |
||
335 | * @param AbstractQuery $query |
||
336 | * @param string $parent |
||
337 | * @return array |
||
338 | */ |
||
339 | 1 | public function queryIds(AbstractQuery $query, $parent = null) |
|
351 | } |
||
352 |
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..