Passed
Push — master ( 9bf5f8...0872bb )
by stéphane
02:09
created
sources/Loader.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -93,7 +93,9 @@  discard block
 block discarded – undo
93 93
     {
94 94
         $source = $this->content ?? preg_split("/\n/m", preg_replace('/(\r\n|\r)/', "\n", $strContent), 0, PREG_SPLIT_DELIM_CAPTURE);
95 95
         //TODO : be more permissive on $strContent values
96
-        if (!is_array($source) || !count($source)) throw new \Exception(self::EXCEPTION_LINE_SPLIT);
96
+        if (!is_array($source) || !count($source)) {
97
+            throw new \Exception(self::EXCEPTION_LINE_SPLIT);
98
+        }
97 99
         foreach ($source as $key => $value) {
98 100
             yield ++$key => $value;
99 101
         }
@@ -116,8 +118,12 @@  discard block
 block discarded – undo
116 118
         try {
117 119
             foreach ($generator as $lineNb => $lineString) {
118 120
                 $node = NodeFactory::get($lineString, $lineNb);
119
-                if ($this->_debug === 1) echo get_class($node)."\n";
120
-                if ($this->needsSpecialProcess($node, $previous)) continue;
121
+                if ($this->_debug === 1) {
122
+                    echo get_class($node)."\n";
123
+                }
124
+                if ($this->needsSpecialProcess($node, $previous)) {
125
+                    continue;
126
+                }
121 127
                 $this->attachBlankLines($previous);
122 128
                 switch ($node->indent <=> $previous->indent) {
123 129
                     case -1: $target = $previous->getTargetOnLessIndent($node);
Please login to merge, or discard this patch.