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