@@ -61,7 +61,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |