Passed
Branch master (91b486)
by Бабичев
03:05
created
src/AdvancedHtmlDom/AHTMLNode.php 2 patches
Spacing   +3 added lines, -4 removed lines patch added patch discarded remove patch
@@ -89,12 +89,11 @@  discard block
 block discarded – undo
89 89
     {
90 90
         $str = \preg_replace_callback(
91 91
             '/(^|[a-z])([A-Z])/',
92
-            function ($matches) {
92
+            function($matches) {
93 93
                 return
94 94
                     \strtolower(
95 95
                         \strlen($matches[1])
96
-                            ? $matches[1] . '_' . $matches[2] :
97
-                            $matches[2]
96
+                            ? $matches[1] . '_' . $matches[2] : $matches[2]
98 97
                     );
99 98
             },
100 99
             $str
@@ -133,7 +132,7 @@  discard block
 block discarded – undo
133 132
         if ($this->at('./preceding-sibling::' . $this->tag) || $this->at('./following-sibling::' . $this->tag) || ($key = $this->tag . 's'))
134 133
         {
135 134
             $count = $this->search('./preceding-sibling::' . $this->tag)->length + 1;
136
-            $tag   .= '_' . $count;
135
+            $tag .= '_' . $count;
137 136
         }
138 137
 
139 138
         if ($children->length == 0)
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,8 +73,7 @@  discard block
 block discarded – undo
73 73
         if ($ref_node = $this->node->nextSibling)
74 74
         {
75 75
             $this->node->parentNode->insertBefore($fragment, $ref_node);
76
-        }
77
-        else
76
+        } else
78 77
         {
79 78
             $this->node->parentNode->appendChild($fragment);
80 79
         }
@@ -139,8 +138,7 @@  discard block
 block discarded – undo
139 138
         if ($children->length == 0)
140 139
         {
141 140
             $ret[$this->decamelize(\implode(' ', \array_filter(array($key, $tag))))] = $this->text;
142
-        }
143
-        else
141
+        } else
144 142
         {
145 143
             $flatten = [];
146 144
             foreach ($children as $child)
Please login to merge, or discard this patch.
src/AdvancedHtmlDom/Str.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@
 block discarded – undo
60 60
         if ($replacement instanceof \Closure)
61 61
         {
62 62
             $val = \preg_replace_callback($regex, $replacement, $this->text, $limit);
63
-        }
64
-        else
63
+        } else
65 64
         {
66 65
             $val = \preg_replace($regex, $replacement, $this->text, $limit);
67 66
         }
Please login to merge, or discard this patch.
src/AdvancedHtmlDom/CSS.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -119,8 +119,7 @@  discard block
 block discarded – undo
119 119
                 $tokens[] = '((last()-position()+1) mod ' . abs($a) . ') = 0';
120 120
             }
121 121
 
122
-        }
123
-        else
122
+        } else
124 123
         {
125 124
 
126 125
             if ($a === null)
@@ -188,8 +187,7 @@  discard block
 block discarded – undo
188 187
             {
189 188
                 $tokens[] = "((last()-position()+1) mod " . abs($a) . ") = 0";
190 189
             }
191
-        }
192
-        else
190
+        } else
193 191
         {
194 192
             if ($a === null)
195 193
             {
@@ -483,8 +481,7 @@  discard block
 block discarded – undo
483 481
                     if (!isset($first_nav))
484 482
                     {
485 483
                         $first_nav = $token;
486
-                    }
487
-                    else
484
+                    } else
488 485
                     {
489 486
                         $retval[] = self::translate_nav(\trim($token));
490 487
                     }
@@ -524,8 +521,7 @@  discard block
 block discarded – undo
524 521
             {
525 522
                 $retval[] = \trim($item);
526 523
                 $item     = '';
527
-            }
528
-            else
524
+            } else
529 525
             {
530 526
                 $item .= $token;
531 527
             }
Please login to merge, or discard this patch.
src/AdvancedHtmlDom/AdvancedHtmlDom.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,8 +70,7 @@
 block discarded – undo
70 70
         if ($is_xml)
71 71
         {
72 72
             @$this->dom->loadXML(\preg_replace('/xmlns=".*?"/ ', '', $html));
73
-        }
74
-        else
73
+        } else
75 74
         {
76 75
             @$this->dom->loadHTML($html);
77 76
         }
Please login to merge, or discard this patch.