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 | * @param string $content |
||
55 | * @return self |
||
56 | */ |
||
57 | 1 | public function setDocumentContent($content) |
|
64 | |||
65 | /** |
||
66 | * @return DOMDocument |
||
67 | */ |
||
68 | 1 | public function getDocument() |
|
72 | |||
73 | /** |
||
74 | * @return DOMXPath |
||
75 | */ |
||
76 | 1 | public function getXPath() |
|
80 | |||
81 | /** |
||
82 | * @return ElementMap |
||
83 | */ |
||
84 | 1 | public function getInputMap() |
|
88 | |||
89 | /** |
||
90 | * @param string $id |
||
91 | * @throws BadMethodCallException |
||
92 | */ |
||
93 | 3 | public function click($id) |
|
108 | |||
109 | /** |
||
110 | * @param string $id |
||
111 | * @throws BadMethodCallException |
||
112 | */ |
||
113 | 2 | public function select($id) |
|
125 | |||
126 | /** |
||
127 | * @param RequestInterface $input |
||
128 | * @throws BadMethodCallException |
||
129 | */ |
||
130 | 1 | public function sendRequest(RequestInterface $request) |
|
136 | |||
137 | /** |
||
138 | * @param string $url |
||
139 | * @throws BadMethodCallException |
||
140 | */ |
||
141 | 1 | public function open(UriInterface $url) |
|
147 | |||
148 | /** |
||
149 | * @return Psr\Http\Message\UriInterface |
||
150 | */ |
||
151 | 1 | public function getUri() |
|
155 | |||
156 | /** |
||
157 | * @param string $xpath |
||
158 | * @param DOMElement|null $scope |
||
159 | * @return DOMNodeList |
||
160 | */ |
||
161 | 1 | public function query($xpath, DOMElement $scope = null) |
|
165 | |||
166 | /** |
||
167 | * @param string $xpath |
||
168 | * @throws InvalidArgumentException when id not found |
||
169 | * @return DOMElement |
||
170 | */ |
||
171 | 1 | public function getElement($xpath) |
|
183 | |||
184 | /** |
||
185 | * @param string $id |
||
186 | * @throws InvalidArgumentException when id not found |
||
187 | * @return string |
||
188 | */ |
||
189 | 1 | public function getText($id) |
|
195 | |||
196 | /** |
||
197 | * @param string $id |
||
198 | * @throws InvalidArgumentException when id not found |
||
199 | * @return string |
||
200 | */ |
||
201 | 1 | public function getTagName($id) |
|
205 | |||
206 | /** |
||
207 | * @param string $id |
||
208 | * @param string $name |
||
209 | * @throws InvalidArgumentException when id not found |
||
210 | * @return string |
||
211 | */ |
||
212 | 1 | public function getAttribute($id, $name) |
|
216 | |||
217 | /** |
||
218 | * @param string $id |
||
219 | * @throws InvalidArgumentException when id not found |
||
220 | * @return string |
||
221 | */ |
||
222 | 1 | public function getHtml($id) |
|
226 | |||
227 | /** |
||
228 | * @return string |
||
229 | */ |
||
230 | 1 | public function getFullHtml() |
|
234 | |||
235 | /** |
||
236 | * @param string $id |
||
237 | * @throws InvalidArgumentException when id not found |
||
238 | * @return boolean |
||
239 | */ |
||
240 | 3 | public function isVisible($id) |
|
258 | |||
259 | /** |
||
260 | * @param string $id |
||
261 | * @throws InvalidArgumentException when id not found |
||
262 | * @return boolean |
||
263 | */ |
||
264 | 4 | public function isSelected($id) |
|
268 | |||
269 | /** |
||
270 | * @param string $id |
||
271 | * @throws InvalidArgumentException when id not found |
||
272 | * @return boolean |
||
273 | */ |
||
274 | 6 | public function isChecked($id) |
|
278 | |||
279 | /** |
||
280 | * @param DOMElement $element |
||
281 | * @throws InvalidArgumentException when id not found |
||
282 | * @return Element\AbstractElement |
||
283 | */ |
||
284 | 9 | public function getInput(DOMElement $element) |
|
288 | |||
289 | /** |
||
290 | * @param string $id |
||
291 | * @throws InvalidArgumentException when id not found |
||
292 | * @return mixed |
||
293 | */ |
||
294 | 1 | public function getValue($id) |
|
298 | |||
299 | /** |
||
300 | * @param string $id |
||
301 | * @param string $value |
||
302 | * @throws InvalidArgumentException when id not found |
||
303 | */ |
||
304 | 1 | public function setValue($id, $value) |
|
312 | |||
313 | /** |
||
314 | * @param AbstractQuery $query |
||
315 | * @param string $parent |
||
316 | * @return array |
||
317 | */ |
||
318 | 1 | public function queryIds(AbstractQuery $query, $parent = null) |
|
330 | } |
||
331 |
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..