Completed
Push — master ( d05c81...e081e8 )
by Kirill
05:02 queued 02:33
created
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/Dictionary.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     private function addLoggerListener(): void
46 46
     {
47
-        parent::onTypeNotFound(function (string $type, ?Definition $from): void {
47
+        parent::onTypeNotFound(function(string $type, ?Definition $from): void {
48 48
             if ($this->logger) {
49 49
                 $direct = 'Try to load type %s from direct method executing';
50 50
                 $context = 'Try to load type %s from %s (%s:%d)';
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function onTypeNotFound(\Closure $then): void
65 65
     {
66
-        parent::onTypeNotFound(function (string $type, ?Definition $from) use ($then): void {
66
+        parent::onTypeNotFound(function(string $type, ?Definition $from) use ($then) : void {
67 67
             if (($file = $then($type, $from)) instanceof Readable) {
68 68
                 $this->compiler->compile($file);
69 69
             }
Please login to merge, or discard this patch.
src/Compiler/Process/Deferred.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
      * @param \Closure $exception
49 49
      * @return DeferredInterface
50 50
      */
51
-    public function catch(\Closure $exception): DeferredInterface
51
+    public function catch (\Closure $exception): DeferredInterface
52 52
     {
53 53
         $this->interceptors->push($exception);
54 54
 
Please login to merge, or discard this patch.
src/Console/SDLCompileCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@
 block discarded – undo
52 52
 
53 53
         $output = $this->option('out') ?: \dirname($schema->getPathname());
54 54
 
55
-        if (! \is_dir($output)) {
56
-            throw new NotReadableException('Output directory "' . $output . '" not exists');
55
+        if (!\is_dir($output)) {
56
+            throw new NotReadableException('Output directory "'.$output.'" not exists');
57 57
         }
58 58
 
59
-        $outputPathname = $output . '/' . \basename($schema->getPathname()) . '.json';
59
+        $outputPathname = $output.'/'.\basename($schema->getPathname()).'.json';
60 60
 
61 61
         \file_put_contents($outputPathname, \json_encode($result));
62 62
     }
Please login to merge, or discard this patch.
src/Console/SDLAnalyzeCommand.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -65,11 +65,11 @@
 block discarded – undo
65 65
                 continue;
66 66
             }
67 67
 
68
-            $position = $def->getFile()->getPathname() . ':' . $def->getLine();
68
+            $position = $def->getFile()->getPathname().':'.$def->getLine();
69 69
 
70
-            $this->writeln('<fg=white;bg=green> ' . \str_repeat(' ', \strlen($position)) . ' </>');
71
-            $this->writeln('<fg=white;bg=green> ' . $position . ' </>');
72
-            $this->writeln('<fg=white;bg=green> ' . \str_repeat(' ', \strlen($position)) . ' </>');
70
+            $this->writeln('<fg=white;bg=green> '.\str_repeat(' ', \strlen($position)).' </>');
71
+            $this->writeln('<fg=white;bg=green> '.$position.' </>');
72
+            $this->writeln('<fg=white;bg=green> '.\str_repeat(' ', \strlen($position)).' </>');
73 73
 
74 74
             $this->render($def);
75 75
             $this->writeln("\n\n");
Please login to merge, or discard this patch.
src/Compiler/Process/DeferredInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,5 +24,5 @@
 block discarded – undo
24 24
      * @param \Closure $exception
25 25
      * @return DeferredInterface
26 26
      */
27
-    public function catch(\Closure $exception): self;
27
+    public function catch (\Closure $exception): self;
28 28
 }
Please login to merge, or discard this patch.
src/Compiler/Process/Pipeline.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,11 +76,11 @@  discard block
 block discarded – undo
76 76
 
77 77
         $this->logger->debug(\sprintf('Add deferred execution (%s:%d)', $trace['file'], $trace['line']));
78 78
 
79
-        $handler->then(function () use ($trace): void {
79
+        $handler->then(function() use ($trace): void {
80 80
             $this->logger->debug(\sprintf('Execute deferred handler (%s:%d)', $trace['file'], $trace['line']));
81 81
         });
82 82
 
83
-        $handler->catch(function (\Throwable $e) use ($trace): void {
83
+        $handler->catch(function(\Throwable $e) use ($trace): void {
84 84
             $this->logger->debug(\sprintf('Deferred handler rejection (%s:%d)', $trace['file'], $trace['line']));
85 85
             $this->logger->error($e);
86 86
 
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
             $this->log($handler);
100 100
         }
101 101
 
102
-        if (! \array_key_exists($priority, $this->queue)) {
102
+        if (!\array_key_exists($priority, $this->queue)) {
103 103
             $this->queue[$priority] = $this->createCollection();
104 104
         }
105 105
 
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function count(): int
123 123
     {
124
-        $accumulator = function (int $result, \SplQueue $queue): int {
124
+        $accumulator = function(int $result, \SplQueue $queue): int {
125 125
             return $result + $queue->count();
126 126
         };
127 127
 
128
-        return (int)\array_reduce($this->queue, $accumulator, 0);
128
+        return (int) \array_reduce($this->queue, $accumulator, 0);
129 129
     }
130 130
 }
Please login to merge, or discard this patch.
src/Console/SDLGrammarCompileCommand.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\\Frontend')
46
-            ->saveTo(__DIR__ . '/../Frontend');
46
+            ->saveTo(__DIR__.'/../Frontend');
47 47
 
48 48
         $this->info('OK');
49 49
     }
Please login to merge, or discard this patch.
src/Frontend/AST/Support/DescriptionProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
      */
41 41
     private function trim(string $content): string
42 42
     {
43
-        $lines = \array_map(function (string $line): string {
43
+        $lines = \array_map(function(string $line): string {
44 44
             return \ltrim($line, '#');
45 45
         }, \explode("\n", $content));
46 46
 
Please login to merge, or discard this patch.