Completed
Pull Request — master (#7)
by
unknown
23:48 queued 12:31
created
src/ProcessingInstruction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace DOMWrap;
4 4
 
Please login to merge, or discard this patch.
src/Document.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace DOMWrap;
4 4
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $html = mb_convert_encoding($html, 'UTF-8', $charset);
117 117
         }
118 118
 
119
-        $this->loadHTML('<?xml encoding="utf-8"?>' . $html);
119
+        $this->loadHTML('<?xml encoding="utf-8"?>'.$html);
120 120
 
121 121
         libxml_use_internal_errors($internalErrors);
122 122
         libxml_disable_entity_loader($disableEntities);
Please login to merge, or discard this patch.
src/Traits/TraversalTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace DOMWrap\Traits;
4 4
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             };
98 98
 
99 99
         } else {
100
-            throw new \InvalidArgumentException('Unexpected input value of type "' . gettype($input) . '"');
100
+            throw new \InvalidArgumentException('Unexpected input value of type "'.gettype($input).'"');
101 101
         }
102 102
 
103 103
         // Build a list of matching nodes.
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             $fn = $input;
170 170
 
171 171
         } else {
172
-            throw new \InvalidArgumentException('Unexpected input value of type "' . gettype($input) . '"');
172
+            throw new \InvalidArgumentException('Unexpected input value of type "'.gettype($input).'"');
173 173
         }
174 174
 
175 175
         return $this->getNodesMatchingInput($fn);
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
      */
348 348
     public function contents(): NodeList {
349 349
         $results = $this->collection()->reduce(function($carry, $node) {
350
-            if($node->isRemoved())
350
+            if ($node->isRemoved())
351 351
                 return $this->newNodeList();
352 352
             return $carry->merge(
353 353
                 $node->newNodeList($node->childNodes)
Please login to merge, or discard this patch.
src/Traits/CommonTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace DOMWrap\Traits;
4 4
 
Please login to merge, or discard this patch.
src/Traits/ManipulationTrait.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace DOMWrap\Traits;
4 4
 
@@ -25,11 +25,11 @@  discard block
 block discarded – undo
25 25
      * @return mixed
26 26
      */
27 27
     public function __call(string $name, array $arguments) {
28
-        if (!method_exists($this, '_' . $name)) {
29
-            throw new \BadMethodCallException("Call to undefined method " . get_class($this) . '::' . $name . "()");
28
+        if (!method_exists($this, '_'.$name)) {
29
+            throw new \BadMethodCallException("Call to undefined method ".get_class($this).'::'.$name."()");
30 30
         }
31 31
 
32
-        return call_user_func_array([$this, '_' . $name], $arguments);
32
+        return call_user_func_array([$this, '_'.$name], $arguments);
33 33
     }
34 34
 
35 35
     /**
@@ -186,8 +186,8 @@  discard block
 block discarded – undo
186 186
      * @return string
187 187
      */
188 188
     public function getText(): string {
189
-        return (string)$this->collection()->reduce(function($carry, $node) {
190
-            return $carry . $node->textContent;
189
+        return (string) $this->collection()->reduce(function($carry, $node) {
190
+            return $carry.$node->textContent;
191 191
         }, '');
192 192
     }
193 193
 
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
      * @return bool
322 322
      */
323 323
     public function hasAttr(string $name): bool {
324
-        return (bool)$this->collection()->reduce(function($carry, $node) use ($name) {
324
+        return (bool) $this->collection()->reduce(function($carry, $node) use ($name) {
325 325
             if ($node->hasAttribute($name)) {
326 326
                 return true;
327 327
             }
@@ -454,10 +454,10 @@  discard block
 block discarded – undo
454 454
      * @return bool
455 455
      */
456 456
     public function hasClass(string $class): bool {
457
-        return (bool)$this->collection()->reduce(function($carry, $node) use ($class) {
457
+        return (bool) $this->collection()->reduce(function($carry, $node) use ($class) {
458 458
             $attr = $node->getAttr('class');
459 459
 
460
-            return array_reduce(explode(' ', (string)$attr), function($carry, $item) use ($class) {
460
+            return array_reduce(explode(' ', (string) $attr), function($carry, $item) use ($class) {
461 461
                 if (strcasecmp($item, $class) == 0) {
462 462
                     return true;
463 463
                 }
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
      */
638 638
     public function getHtml(): string {
639 639
         return $this->collection()->first()->children()->reduce(function($carry, $node) {
640
-            return $carry . $this->document()->saveHTML($node);
640
+            return $carry.$this->document()->saveHTML($node);
641 641
         }, '');
642 642
     }
643 643
 
Please login to merge, or discard this patch.
src/Collections/NodeCollection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace DOMWrap\Collections;
4 4
 
Please login to merge, or discard this patch.
src/NodeList.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace DOMWrap;
4 4
 
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
             $result = $this->__manipulationCall($name, $arguments);
48 48
         } catch (\BadMethodCallException $e) {
49 49
             if (!method_exists($this->first(), $name)) {
50
-                throw new \BadMethodCallException("Call to undefined method " . get_class($this) . '::' . $name . "()");
50
+                throw new \BadMethodCallException("Call to undefined method ".get_class($this).'::'.$name."()");
51 51
             }
52 52
 
53 53
             $result = call_user_func_array([$this->first(), $name], $arguments);
Please login to merge, or discard this patch.
src/DocumentType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace DOMWrap;
4 4
 
Please login to merge, or discard this patch.
src/Element.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 namespace DOMWrap;
4 4
 
Please login to merge, or discard this patch.