| Conditions | 3 |
| Paths | 3 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | final public function dump(?string $selector = null): void |
||
| 17 | { |
||
| 18 | if (null === $selector) { |
||
| 19 | parent::dump(); |
||
| 20 | |||
| 21 | return; |
||
| 22 | } |
||
| 23 | |||
| 24 | $elements = $this->crawler()->filter($selector); |
||
| 25 | |||
| 26 | if (0 === $elements->count()) { |
||
| 27 | throw new \RuntimeException("Element \"{$selector}\" not found."); |
||
| 28 | } |
||
| 29 | |||
| 30 | $elements->each(function(Crawler $node) { |
||
| 31 | VarDumper::dump($node->outerHtml()); |
||
| 32 | }); |
||
| 35 |