@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | $callback = [$this->ownerDocument, 'create' . $m[2]]; |
| 22 | 22 | if (is_callable($callback)) |
| 23 | 23 | { |
| 24 | - $element = call_user_func_array($callback, $arguments); |
|
| 24 | + $element = call_user_func_array($callback, $arguments); |
|
| 25 | 25 | $where = ($m[1] === 'append') ? 'beforeend' : 'afterbegin'; |
| 26 | 26 | |
| 27 | 27 | return $this->insertAdjacentElement($where, $element); |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | return preg_replace_callback( |
| 96 | 96 | '(<([-\\w]++):[^>]++>)', |
| 97 | - function ($m) use ($prefixes) |
|
| 97 | + function($m) use ($prefixes) |
|
| 98 | 98 | { |
| 99 | 99 | $xml = $m[0]; |
| 100 | 100 | $prefix = $m[1]; |
@@ -126,20 +126,16 @@ |
||
| 126 | 126 | if ($where === 'beforebegin') |
| 127 | 127 | { |
| 128 | 128 | $this->parentNode->insertBefore($node, $this); |
| 129 | - } |
|
| 130 | - elseif ($where === 'beforeend') |
|
| 129 | + } elseif ($where === 'beforeend') |
|
| 131 | 130 | { |
| 132 | 131 | $this->appendChild($node); |
| 133 | - } |
|
| 134 | - elseif ($where === 'afterend') |
|
| 132 | + } elseif ($where === 'afterend') |
|
| 135 | 133 | { |
| 136 | 134 | $this->parentNode->insertBefore($node, $this->nextSibling); |
| 137 | - } |
|
| 138 | - elseif ($where === 'afterbegin') |
|
| 135 | + } elseif ($where === 'afterbegin') |
|
| 139 | 136 | { |
| 140 | 137 | $this->insertBefore($node, $this->firstChild); |
| 141 | - } |
|
| 142 | - else |
|
| 138 | + } else |
|
| 143 | 139 | { |
| 144 | 140 | throw new InvalidArgumentException; |
| 145 | 141 | } |