Passed
Push — master ( 212ee2...6c3f09 )
by William
03:40 queued 12s
created
src/Tools/TestGenerator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
         // The code below extracts only the relevant information.
84 84
 
85 85
         // Extracting lexer's errors.
86
-        if (! empty($lexer->errors)) {
86
+        if (!empty($lexer->errors)) {
87 87
             /** @var LexerException $err */
88 88
             foreach ($lexer->errors as $err) {
89 89
                 $lexerErrors[] = [
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
         }
99 99
 
100 100
         // Extracting parser's errors.
101
-        if (! empty($parser->errors)) {
101
+        if (!empty($parser->errors)) {
102 102
             /** @var ParserException $err */
103 103
             foreach ($parser->errors as $err) {
104 104
                 $parserErrors[] = [
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
     public static function build($type, $input, $output, $debug = null, $ansi = false)
139 139
     {
140 140
         // Support query types: `lexer` / `parser`.
141
-        if (! in_array($type, ['lexer', 'parser'])) {
141
+        if (!in_array($type, ['lexer', 'parser'])) {
142 142
             throw new Exception('Unknown test type (expected `lexer` or `parser`).');
143 143
         }
144 144
 
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         );
184 184
 
185 185
         // Remove the project path from .out file, it changes for each dev
186
-        $projectFolder = dirname(__DIR__, 2);// Jump to root
186
+        $projectFolder = dirname(__DIR__, 2); // Jump to root
187 187
         $encoded = str_replace($projectFolder, '<project-root>', $encoded);
188 188
 
189 189
         file_put_contents($output, $encoded);
@@ -223,11 +223,11 @@  discard block
 block discarded – undo
223 223
             if (is_dir($inputFile)) {
224 224
                 // Creating required directories to maintain the structure.
225 225
                 // Ignoring errors if the folder structure exists already.
226
-                if (! is_dir($outputFile)) {
226
+                if (!is_dir($outputFile)) {
227 227
                     mkdir($outputFile);
228 228
                 }
229 229
 
230
-                if (($debug !== null) && (! is_dir($debugFile))) {
230
+                if (($debug !== null) && (!is_dir($debugFile))) {
231 231
                     mkdir($debugFile);
232 232
                 }
233 233
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
                 }
243 243
 
244 244
                 // Building the test.
245
-                if (! file_exists($outputFile)) {
245
+                if (!file_exists($outputFile)) {
246 246
                     echo sprintf("Building test for %s...\n", $inputFile);
247 247
                     static::build(
248 248
                         str_contains($inputFile, 'lex') ? 'lexer' : 'parser',
Please login to merge, or discard this patch.