Completed
Push — master ( c1a156...8cadde )
by Kirill
08:14
created
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): DeferredInterface;
27
+    public function catch (\Closure $exception): DeferredInterface;
28 28
 }
Please login to merge, or discard this patch.
src/Compiler/Process/Pipeline.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -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/Compiler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     public function compile(Readable $file): DocumentInterface
109 109
     {
110 110
         try {
111
-            return $this->memoize($file, function (Readable $file): DocumentInterface {
111
+            return $this->memoize($file, function(Readable $file): DocumentInterface {
112 112
                 return $this->builder->run($this->reflection, $file, $this->parse($file));
113 113
             });
114 114
         } catch (CompilerException $e) {
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\\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/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/Ast/Common/TypeHintNode.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function isList(): bool
72 72
     {
73
-        return (bool)($this->modifiers & Hint::IS_LIST);
73
+        return (bool) ($this->modifiers & Hint::IS_LIST);
74 74
     }
75 75
 
76 76
     /**
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function isNonNull(): bool
80 80
     {
81
-        return (bool)($this->modifiers & Hint::IS_NOT_NULL);
81
+        return (bool) ($this->modifiers & Hint::IS_NOT_NULL);
82 82
     }
83 83
 
84 84
     /**
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function isListOfNonNulls(): bool
88 88
     {
89
-        return (bool)($this->modifiers & Hint::IS_LIST_OF_NOT_NULL);
89
+        return (bool) ($this->modifiers & Hint::IS_LIST_OF_NOT_NULL);
90 90
     }
91 91
 
92 92
     /**
Please login to merge, or discard this patch.
src/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/Ast/Value/ListValueNode.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
     public function toString(): string
23 23
     {
24
-        $values = \array_map(function (ValueInterface $value) {
24
+        $values = \array_map(function(ValueInterface $value) {
25 25
             return $value->toString();
26 26
         }, \iterator_to_array($this->getValues()));
27 27
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
      */
34 34
     public function toPrimitive(): iterable
35 35
     {
36
-        return \array_map(function (ValueInterface $value) {
36
+        return \array_map(function(ValueInterface $value) {
37 37
             return $value->toPrimitive();
38 38
         }, \iterator_to_array($this->getValues()));
39 39
     }
Please login to merge, or discard this patch.