Test Failed
Pull Request — master (#291)
by William
12:25
created
tools/ContextGenerator.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             }
156 156
 
157 157
             $value = strtoupper($value);
158
-            if (! isset($types[$value])) {
158
+            if (!isset($types[$value])) {
159 159
                 $types[$value] = $type;
160 160
             } else {
161 161
                 $types[$value] |= $type;
@@ -165,10 +165,10 @@  discard block
 block discarded – undo
165 165
         $ret = array();
166 166
         foreach ($types as $word => $type) {
167 167
             $len = strlen($word);
168
-            if (! isset($ret[$type])) {
168
+            if (!isset($ret[$type])) {
169 169
                 $ret[$type] = array();
170 170
             }
171
-            if (! isset($ret[$type][$len])) {
171
+            if (!isset($ret[$type][$len])) {
172 172
                 $ret[$type][$len] = array();
173 173
             }
174 174
             $ret[$type][$len][] = $word;
@@ -389,9 +389,9 @@  discard block
 block discarded – undo
389 389
     $output = rtrim($argv[2], '/');
390 390
 
391 391
     // Checking if all directories are valid.
392
-    if (! is_dir($input)) {
392
+    if (!is_dir($input)) {
393 393
         throw new \Exception('The input directory does not exist.');
394
-    } elseif (! is_dir($output)) {
394
+    } elseif (!is_dir($output)) {
395 395
         throw new \Exception('The output directory does not exist.');
396 396
     }
397 397
 
Please login to merge, or discard this patch.
src/Components/OrderKeyword.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
                 } elseif (($token->type === Token::TYPE_OPERATOR)
94 94
                     && ($token->value === ',')
95 95
                 ) {
96
-                    if (! empty($expr->expr)) {
96
+                    if (!empty($expr->expr)) {
97 97
                         $ret[] = $expr;
98 98
                     }
99 99
                     $expr = new self();
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         }
106 106
 
107 107
         // Last iteration was not processed.
108
-        if (! empty($expr->expr)) {
108
+        if (!empty($expr->expr)) {
109 109
             $ret[] = $expr;
110 110
         }
111 111
 
Please login to merge, or discard this patch.
tools/TestGenerator.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         // The code below extracts only the relevant information.
62 62
 
63 63
         // Extracting lexer's errors.
64
-        if (! empty($lexer->errors)) {
64
+        if (!empty($lexer->errors)) {
65 65
             foreach ($lexer->errors as $err) {
66 66
                 $lexerErrors[] = array(
67 67
                     $err->getMessage(),
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
         }
75 75
 
76 76
         // Extracting parser's errors.
77
-        if (! empty($parser->errors)) {
77
+        if (!empty($parser->errors)) {
78 78
             foreach ($parser->errors as $err) {
79 79
                 $parserErrors[] = array(
80 80
                     $err->getMessage(),
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
     public static function build($type, $input, $output, $debug = null, $ansi = false)
111 111
     {
112 112
         // Support query types: `lexer` / `parser`.
113
-        if (! in_array($type, array('lexer', 'parser'))) {
113
+        if (!in_array($type, array('lexer', 'parser'))) {
114 114
             throw new \Exception('Unknown test type (expected `lexer` or `parser`).');
115 115
         }
116 116
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
         file_put_contents($output, serialize($test));
141 141
 
142 142
         // Dumping test's data in human readable format too (if required).
143
-        if (! empty($debug)) {
143
+        if (!empty($debug)) {
144 144
             file_put_contents($debug, print_r($test, true));
145 145
         }
146 146
     }
@@ -170,10 +170,10 @@  discard block
 block discarded – undo
170 170
             if (is_dir($inputFile)) {
171 171
                 // Creating required directories to maintain the structure.
172 172
                 // Ignoring errors if the folder structure exists already.
173
-                if (! is_dir($outputFile)) {
173
+                if (!is_dir($outputFile)) {
174 174
                     mkdir($outputFile);
175 175
                 }
176
-                if (($debug !== null) && (! is_dir($debugFile))) {
176
+                if (($debug !== null) && (!is_dir($debugFile))) {
177 177
                     mkdir($debugFile);
178 178
                 }
179 179
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
                 }
189 189
 
190 190
                 // Building the test.
191
-                if (! file_exists($outputFile)) {
191
+                if (!file_exists($outputFile)) {
192 192
                     sprintf("Building test for %s...\n", $inputFile);
193 193
                     static::build(
194 194
                         strpos($inputFile, 'lex') !== false ? 'lexer' : 'parser',
@@ -222,11 +222,11 @@  discard block
 block discarded – undo
222 222
     $debug = empty($argv[3]) ? null : rtrim($argv[3], '/');
223 223
 
224 224
     // Checking if all directories are valid.
225
-    if (! is_dir($input)) {
225
+    if (!is_dir($input)) {
226 226
         throw new \Exception('The input directory does not exist.');
227
-    } elseif (! is_dir($output)) {
227
+    } elseif (!is_dir($output)) {
228 228
         throw new \Exception('The output directory does not exist.');
229
-    } elseif (($debug !== null) && (! is_dir($debug))) {
229
+    } elseif (($debug !== null) && (!is_dir($debug))) {
230 230
         throw new \Exception('The debug directory does not exist.');
231 231
     }
232 232
 
Please login to merge, or discard this patch.