Test Failed
Push — master ( 9fa0b4...c1a156 )
by Kirill
06:08 queued 03:03
created
src/Console/SDLAnalyzeCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,11 +37,11 @@
 block discarded – undo
37 37
         $ast = (new Parser())->parse(File::fromPathname($this->argument('schema')));
38 38
 
39 39
         if ($root = $this->option('find')) {
40
-            foreach ($ast->find((string)$root) as $child) {
41
-                $this->writeln((string)$child);
40
+            foreach ($ast->find((string) $root) as $child) {
41
+                $this->writeln((string) $child);
42 42
             }
43 43
         } else {
44
-            $this->writeln((string)$ast);
44
+            $this->writeln((string) $ast);
45 45
         }
46 46
     }
47 47
 }
Please login to merge, or discard this patch.
src/Compiler.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
      */
83 83
     public function autoload(\Closure $then): void
84 84
     {
85
-        $this->dictionary->onTypeNotFound(function (string $type, ?Definition $from) use ($then): void {
85
+        $this->dictionary->onTypeNotFound(function(string $type, ?Definition $from) use ($then) : void {
86 86
             if (($file = $then($type, $from)) instanceof Readable) {
87 87
                 $this->compile($file);
88 88
             }
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,6 @@
 block discarded – undo
11 11
 
12 12
 use Railt\Io\Readable;
13 13
 use Railt\Parser\Ast\RuleInterface;
14
-use Railt\Parser\Exception\UnexpectedTokenException;
15 14
 use Railt\Parser\Exception\UnrecognizedTokenException;
16 15
 use Railt\Reflection\Contracts\Definition;
17 16
 use Railt\Reflection\Contracts\Dictionary;
Please login to merge, or discard this patch.
src/Compiler/Pipeline.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function push(int $priority, callable $then): void
76 76
     {
77
-        if (! \array_key_exists($priority, $this->queue)) {
77
+        if (!\array_key_exists($priority, $this->queue)) {
78 78
             $this->queue[$priority] = $this->createList();
79 79
         }
80 80
 
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
      */
95 95
     public function count(): int
96 96
     {
97
-        return (int)\array_reduce($this->queue, function (int $result, \SplQueue $queue): int {
97
+        return (int) \array_reduce($this->queue, function(int $result, \SplQueue $queue): int {
98 98
             return $result + $queue->count();
99 99
         }, 0);
100 100
     }
Please login to merge, or discard this patch.
src/Console/SDLCompileCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
     /**
22 22
      * @var string
23 23
      */
24
-    private const SCHEMA_SDL_GRAMMAR = __DIR__ . '/../../resources/grammar.pp2';
24
+    private const SCHEMA_SDL_GRAMMAR = __DIR__.'/../../resources/grammar.pp2';
25 25
 
26 26
     /**
27 27
      * @var string
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         Compiler::load(File::fromPathname(self::SCHEMA_SDL_GRAMMAR))
44 44
             ->setClassName('Parser')
45 45
             ->setNamespace('Railt\\SDL\\Compiler')
46
-            ->saveTo(__DIR__ . '/../Compiler');
46
+            ->saveTo(__DIR__.'/../Compiler');
47 47
 
48 48
         $this->info('OK');
49 49
     }
Please login to merge, or discard this patch.
src/Compiler/Ast/Value/StringValueNode.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     private function renderUtfSequences(string $body): string
95 95
     {
96
-        $callee = function (array $matches): string {
96
+        $callee = function(array $matches): string {
97 97
             [$char, $code] = [$matches[0], $matches[1]];
98 98
 
99 99
             try {
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
     {
124 124
         try {
125 125
             if (\function_exists('\\json_decode')) {
126
-                $result = @\json_decode('{"char": "' . $body . '"}')->char;
126
+                $result = @\json_decode('{"char": "'.$body.'"}')->char;
127 127
 
128 128
                 if (\json_last_error() === \JSON_ERROR_NONE) {
129 129
                     $body = $result;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     private function renderSpecialCharacters(string $body): string
145 145
     {
146
-        $callee = function (array $matches): string {
146
+        $callee = function(array $matches): string {
147 147
             [$char, $code] = [$matches[0], $matches[1]];
148 148
 
149 149
             switch ($code) {
Please login to merge, or discard this patch.
src/helpers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
  */
8 8
 declare(strict_types=1);
9 9
 
10
-if (! \function_exists('\\sdl')) {
10
+if (!\function_exists('\\sdl')) {
11 11
     /**
12 12
      * @param string $fileOrSources
13 13
      * @param bool $filename
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 }
26 26
 
27 27
 
28
-if (! \function_exists('trait_uses_recursive')) {
28
+if (!\function_exists('trait_uses_recursive')) {
29 29
     /**
30 30
      * Returns all traits used by a trait and its traits.
31 31
      *
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 }
46 46
 
47 47
 
48
-if (! \function_exists('class_uses_recursive')) {
48
+if (!\function_exists('class_uses_recursive')) {
49 49
     /**
50 50
      * Returns all traits used by a class, its parent classes and trait of their traits.
51 51
      *
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 }
70 70
 
71 71
 
72
-if (! \function_exists('class_basename')) {
72
+if (!\function_exists('class_basename')) {
73 73
     /**
74 74
      * Get the class "basename" of the given object / class.
75 75
      *
Please login to merge, or discard this patch.
src/Compiler/Ast/Common/DirectivesProvider.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 trait DirectivesProvider
18 18
 {
19 19
     /**
20
-     * @return iterable|DirectiveNode[]
20
+     * @return \Generator
21 21
      */
22 22
     public function getDirectives(): iterable
23 23
     {
Please login to merge, or discard this patch.
src/Compiler/Ast/Dependent/FieldDefinitionNode.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
     }
40 40
 
41 41
     /**
42
-     * @return iterable|ArgumentDefinitionNode[]
42
+     * @return \Generator
43 43
      */
44 44
     public function getArguments(): iterable
45 45
     {
Please login to merge, or discard this patch.
src/Compiler/Ast/Common/FieldsProviders.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
 trait FieldsProviders
18 18
 {
19 19
     /**
20
-     * @return iterable|FieldDefinitionNode[]
20
+     * @return \Generator
21 21
      */
22 22
     public function getFields(): iterable
23 23
     {
Please login to merge, or discard this patch.