@@ -84,9 +84,9 @@ discard block |
||
84 | 84 | $splos->rewind(); |
85 | 85 | $first = $splos->current(); |
86 | 86 | if ($first instanceof \DOMDocument) { |
87 | - $this->dom = $first;//->documentElement; |
|
87 | + $this->dom = $first; //->documentElement; |
|
88 | 88 | } else { |
89 | - $this->dom = $first->ownerDocument;//->documentElement; |
|
89 | + $this->dom = $first->ownerDocument; //->documentElement; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | $this->scopeNode = $scopeNode; |
@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | return $this->combineAnyDescendant($node, $selectors, $index); |
265 | 265 | case SimpleSelector::ANOTHER_SELECTOR: |
266 | 266 | // fprintf(STDOUT, "Next selector: %s\n", $selectors[$index]); |
267 | - return $this->matchesSimpleSelector($node, $selectors, $index);; |
|
267 | + return $this->matchesSimpleSelector($node, $selectors, $index); ; |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | return false; |
@@ -776,7 +776,7 @@ discard block |
||
776 | 776 | $name = $pseudoClass['name']; |
777 | 777 | // Avoid E_STRICT violation. |
778 | 778 | $value = $pseudoClass['value'] ?? NULL; |
779 | - $ret &= $this->psHandler->elementMatches($name, $node, $this->scopeNode, $value); |
|
779 | + $ret &= $this->psHandler->elementMatches($name, $node, $this->scopeNode, $value); |
|
780 | 780 | } |
781 | 781 | |
782 | 782 | return $ret; |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | array_shift($args); |
92 | 92 | } |
93 | 93 | |
94 | - $getter = function ($qp) { |
|
94 | + $getter = function($qp) { |
|
95 | 95 | return $qp->text(); |
96 | 96 | }; |
97 | 97 | |
98 | - $setter = function ($qp, $value) { |
|
98 | + $setter = function($qp, $value) { |
|
99 | 99 | $qp->text($value); |
100 | 100 | }; |
101 | 101 | |
@@ -143,11 +143,11 @@ discard block |
||
143 | 143 | $args = array_slice(func_get_args(), 2); |
144 | 144 | } |
145 | 145 | |
146 | - $getter = function ($qp) use ($attrName) { |
|
146 | + $getter = function($qp) use ($attrName) { |
|
147 | 147 | return $qp->attr($attrName); |
148 | 148 | }; |
149 | 149 | |
150 | - $setter = function ($qp, $value) use ($attrName) { |
|
150 | + $setter = function($qp, $value) use ($attrName) { |
|
151 | 151 | return $qp->attr($attrName, $value); |
152 | 152 | }; |
153 | 153 | |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | */ |
214 | 214 | protected function prepareArgs($args, $pos): array |
215 | 215 | { |
216 | - $padded = array_pad((array) $args, (0 < $pos) ? $pos - 1 : 0, null); |
|
216 | + $padded = array_pad((array)$args, (0 < $pos) ? $pos - 1 : 0, null); |
|
217 | 217 | array_splice($padded, $pos, 0, array(null)); // insert null as a place holder |
218 | 218 | return $padded; |
219 | 219 | } |
@@ -18,6 +18,6 @@ |
||
18 | 18 | public static function initializeFromError($errno, $errstr, $errfile, $errline, $context = null) |
19 | 19 | { |
20 | 20 | $class = __CLASS__; |
21 | - throw new $class($errno, (int) $errstr, $errfile, $errline); |
|
21 | + throw new $class($errno, (int)$errstr, $errfile, $errline); |
|
22 | 22 | } |
23 | 23 | } |
@@ -68,10 +68,10 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function __construct($document = NULL, $string = '', $options = []) |
70 | 70 | { |
71 | - // Backwards compatibility fix for PHP8+ |
|
72 | - if (is_null($string)) { |
|
73 | - $string = ''; |
|
74 | - } |
|
71 | + // Backwards compatibility fix for PHP8+ |
|
72 | + if (is_null($string)) { |
|
73 | + $string = ''; |
|
74 | + } |
|
75 | 75 | |
76 | 76 | $string = trim($string); |
77 | 77 | $this->options = $options + Options::get() + $this->options; |
@@ -416,10 +416,10 @@ discard block |
||
416 | 416 | */ |
417 | 417 | private function parseXMLFile($filename, $flags = 0, $context = NULL) |
418 | 418 | { |
419 | - // Backwards compatibility fix for PHP8+ |
|
420 | - if (is_null($flags)) { |
|
421 | - $flags = 0; |
|
422 | - } |
|
419 | + // Backwards compatibility fix for PHP8+ |
|
420 | + if (is_null($flags)) { |
|
421 | + $flags = 0; |
|
422 | + } |
|
423 | 423 | |
424 | 424 | // If a context is specified, we basically have to do the reading in |
425 | 425 | // two steps: |
@@ -45,6 +45,6 @@ |
||
45 | 45 | public static function initializeFromError($errno, $errstr, $errfile, $errline, $context = null) |
46 | 46 | { |
47 | 47 | $class = __CLASS__; |
48 | - throw new $class($errno, (int) $errstr, $errfile, $errline); |
|
48 | + throw new $class($errno, (int)$errstr, $errfile, $errline); |
|
49 | 49 | } |
50 | 50 | } |
@@ -1231,10 +1231,10 @@ |
||
1231 | 1231 | */ |
1232 | 1232 | public function writeXML($path = NULL, $options = 0) |
1233 | 1233 | { |
1234 | - // Backwards compatibility fix for PHP8+ |
|
1235 | - if (is_null($options)) { |
|
1236 | - $options = 0; |
|
1237 | - } |
|
1234 | + // Backwards compatibility fix for PHP8+ |
|
1235 | + if (is_null($options)) { |
|
1236 | + $options = 0; |
|
1237 | + } |
|
1238 | 1238 | |
1239 | 1239 | if ($path === NULL) { |
1240 | 1240 | print $this->document->saveXML(NULL, $options); |