@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | { |
13 | 13 | $this->document = $document; |
14 | 14 | $this->dom = $document->dom; |
15 | - $this->namespaces =& $document->namespaces; |
|
15 | + $this->namespaces = & $document->namespaces; |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function insertElement(&$nodes, $element, &$optionals, $fn, $orig_context) |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | // offers to the user and is the same of: |
35 | 35 | // 1. appending a child switching the context |
36 | 36 | // 2. setting the attributes over the new context. |
37 | - if (! empty($attributes)) { |
|
37 | + if (!empty($attributes)) { |
|
38 | 38 | $new_context->setAttribute($attributes); |
39 | 39 | } |
40 | 40 | |
@@ -48,8 +48,8 @@ discard block |
||
48 | 48 | |
49 | 49 | protected function handleOptionals($element, &$optionals) |
50 | 50 | { |
51 | - if (! \is_array($element)) { |
|
52 | - $element = [ $element ]; |
|
51 | + if (!\is_array($element)) { |
|
52 | + $element = [$element]; |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | $switch_context = false; |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | } |
75 | 75 | } |
76 | 76 | |
77 | - return [ $element, $attributes, $switch_context ]; |
|
77 | + return [$element, $attributes, $switch_context]; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | |
103 | 103 | protected function handleStringMixed($parent, $k, $v, $fn, &$optionals, &$status) |
104 | 104 | { |
105 | - if (! \is_string($k)) { |
|
105 | + if (!\is_string($k)) { |
|
106 | 106 | return; |
107 | 107 | } |
108 | 108 | |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | } |
117 | 117 | } else { |
118 | 118 | if (\is_string($v)) { |
119 | - if (! FluidHelper::isAnXmlString($v)) { |
|
119 | + if (!FluidHelper::isAnXmlString($v)) { |
|
120 | 120 | $handler = 'insertStringSimple'; |
121 | 121 | } |
122 | 122 | } else { |
@@ -224,8 +224,8 @@ discard block |
||
224 | 224 | |
225 | 225 | protected function attachNodes($parent, $nodes, $fn) |
226 | 226 | { |
227 | - if (! \is_array($nodes) && ! $nodes instanceof \Traversable) { |
|
228 | - $nodes = [ $nodes ]; |
|
227 | + if (!\is_array($nodes) && !$nodes instanceof \Traversable) { |
|
228 | + $nodes = [$nodes]; |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | $context = []; |
@@ -274,7 +274,7 @@ discard block |
||
274 | 274 | $el = $this->createElement($k, $v); |
275 | 275 | $el = $fn($parent, $el); |
276 | 276 | |
277 | - return [ $el ]; |
|
277 | + return [$el]; |
|
278 | 278 | } |
279 | 279 | |
280 | 280 | protected function insertStringMixed($parent, $k, $v, $fn, &$optionals) |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | // they are supplied, so 'addChild' is the perfect operation. |
292 | 292 | $this->newContext($el)->addChild($v, ...$optionals); |
293 | 293 | |
294 | - return [ $el ]; |
|
294 | + return [$el]; |
|
295 | 295 | } |
296 | 296 | |
297 | 297 | protected function insertIntegerArray($parent, $k, $v, $fn, &$optionals) |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | $el = $this->createElement($v); |
319 | 319 | $el = $fn($parent, $el); |
320 | 320 | |
321 | - return [ $el ]; |
|
321 | + return [$el]; |
|
322 | 322 | } |
323 | 323 | |
324 | 324 | protected function insertIntegerXml($parent, $k, $v, $fn) |