Total Complexity | 6 |
Total Lines | 44 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
17 | class XPath |
||
18 | { |
||
19 | /** |
||
20 | * Get an instance of DOMXPath associated with a DOMNode |
||
21 | * |
||
22 | * @param \DOMNode $node The associated node |
||
23 | * @return \DOMXPath |
||
24 | */ |
||
25 | public static function getXPath(DOMNode $node): DOMXPath |
||
41 | } |
||
42 | |||
43 | /** |
||
44 | * Do an XPath query on an XML node. |
||
45 | * |
||
46 | * @param \DOMNode $node The XML node. |
||
47 | * @param string $query The query. |
||
48 | * @param \DOMXPath $xpCache The DOMXPath object |
||
49 | * @return array<int<0, max>, \DOMNameSpaceNode|\DOMNode|null> Array with matching DOM nodes. |
||
50 | */ |
||
51 | public static function xpQuery(DOMNode $node, string $query, DOMXPath $xpCache): array |
||
63 |