@@ -10,8 +10,8 @@ discard block |
||
10 | 10 | use FluidAliasesTrait, |
11 | 11 | FluidSaveTrait, |
12 | 12 | NewableTrait, |
13 | - ReservedCallTrait, // For compatibility with PHP 5.6. |
|
14 | - ReservedCallStaticTrait; // For compatibility with PHP 5.6. |
|
13 | + ReservedCallTrait, // For compatibility with PHP 5.6. |
|
14 | + ReservedCallStaticTrait; // For compatibility with PHP 5.6. |
|
15 | 15 | |
16 | 16 | private $document; |
17 | 17 | private $handler; |
@@ -23,14 +23,14 @@ discard block |
||
23 | 23 | $this->document = $document; |
24 | 24 | $this->handler = $handler; |
25 | 25 | |
26 | - if (! \is_array($context) && ! $context instanceof \Traversable) { |
|
26 | + if (!\is_array($context) && !$context instanceof \Traversable) { |
|
27 | 27 | // DOMDocument, DOMElement and DOMNode are not iterable. |
28 | 28 | // DOMNodeList and FluidContext are iterable. |
29 | - $context = [ $context ]; |
|
29 | + $context = [$context]; |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | foreach ($context as $n) { |
33 | - if (! $n instanceof \DOMNode) { |
|
33 | + if (!$n instanceof \DOMNode) { |
|
34 | 34 | throw new \Exception('Node type not recognized.'); |
35 | 35 | } |
36 | 36 | |
@@ -199,14 +199,14 @@ discard block |
||
199 | 199 | // addChild($child, $value?, $attributes? = [], $switchContext? = false) |
200 | 200 | public function addChild($child, ...$optionals) |
201 | 201 | { |
202 | - return $this->handler->insertElement($this->nodes, $child, $optionals, function ($parent, $element) { |
|
202 | + return $this->handler->insertElement($this->nodes, $child, $optionals, function($parent, $element) { |
|
203 | 203 | return $parent->appendChild($element); |
204 | 204 | }, $this); |
205 | 205 | } |
206 | 206 | |
207 | 207 | public function prependSibling($sibling, ...$optionals) |
208 | 208 | { |
209 | - return $this->handler->insertElement($this->nodes, $sibling, $optionals, function ($sibling, $element) { |
|
209 | + return $this->handler->insertElement($this->nodes, $sibling, $optionals, function($sibling, $element) { |
|
210 | 210 | if ($sibling->parentNode === null) { |
211 | 211 | // If the node doesn't have at least one parent node, |
212 | 212 | // the sibling creation fails. In this case we replace |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | |
222 | 222 | public function appendSibling($sibling, ...$optionals) |
223 | 223 | { |
224 | - return $this->handler->insertElement($this->nodes, $sibling, $optionals, function ($sibling, $element) { |
|
224 | + return $this->handler->insertElement($this->nodes, $sibling, $optionals, function($sibling, $element) { |
|
225 | 225 | if ($sibling->parentNode === null) { |
226 | 226 | // If the node doesn't have at least one parent node, |
227 | 227 | // the sibling creation fails. In this case we replace |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | if (\is_array($name)) { |
243 | 243 | $attrs = $name; |
244 | 244 | } else { |
245 | - $attrs = [ $name => $value ]; |
|
245 | + $attrs = [$name => $value]; |
|
246 | 246 | } |
247 | 247 | |
248 | 248 | foreach ($this->nodes as $n) { |
@@ -394,10 +394,10 @@ discard block |
||
394 | 394 | |
395 | 395 | protected function resolveQuery($query) |
396 | 396 | { |
397 | - if ( $query === '.' |
|
397 | + if ($query === '.' |
|
398 | 398 | || $query[0] === '/' |
399 | - || ( $query[0] === '.' && $query[1] === '/' ) |
|
400 | - || ( $query[0] === '.' && $query[1] === '.' ) ) { |
|
399 | + || ($query[0] === '.' && $query[1] === '/') |
|
400 | + || ($query[0] === '.' && $query[1] === '.')) { |
|
401 | 401 | return $query; |
402 | 402 | } |
403 | 403 | |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | $found = ($r === $u) || $found; |
416 | 416 | } |
417 | 417 | |
418 | - if (! $found) { |
|
418 | + if (!$found) { |
|
419 | 419 | $set[] = $r; |
420 | 420 | } |
421 | 421 | } |