Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 2 |
Changes | 2 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
44 | 21 | public function querySelectorAll($selector) |
|
45 | 3 | { |
|
46 | 21 | $converter = new CssSelectorConverter(); |
|
47 | |||
48 | 18 | $xpathQuery = $converter->toXPath($selector); |
|
49 | |||
50 | 18 | $results = $this->xpath->query($xpathQuery); |
|
51 | |||
52 | 18 | $return = new NodeCollection(); |
|
53 | |||
54 | 18 | for ($i = 0; $i < $results->length; $i++) { |
|
55 | 18 | $node = new Node($results->item($i)); |
|
56 | 18 | $return->append($node); |
|
57 | 18 | } |
|
58 | |||
59 | 18 | return $return; |
|
60 | } |
||
61 | |||
71 |