| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 24 | public function dump(?string $selector = null): void |
||
| 25 | { |
||
| 26 | if (null === $selector) { |
||
| 27 | parent::dump(); |
||
| 28 | |||
| 29 | return; |
||
| 30 | } |
||
| 31 | |||
| 32 | $elements = $this->crawler()->filter($selector); |
||
| 33 | |||
| 34 | if (!\count($elements)) { |
||
| 35 | throw new \RuntimeException("Element \"{$selector}\" not found."); |
||
| 36 | } |
||
| 37 | |||
| 38 | foreach ($elements as $element) { |
||
| 39 | VarDumper::dump($element->textContent); |
||
| 40 | } |
||
| 43 |