Completed
Push — master ( 88ff28...2dc58f )
by Kirill
06:03
created
src/Iterator/SlicedIterator.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
     }
93 93
 
94 94
     /**
95
-     * @return mixed|null
95
+     * @return \Railt\Lexer\TokenInterface
96 96
      */
97 97
     public function current()
98 98
     {
Please login to merge, or discard this patch.
src/Reader/Runtime.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -15,7 +15,6 @@
 block discarded – undo
15 15
 use Railt\Lexer\LexerInterface;
16 16
 use Railt\Parser\Parser;
17 17
 use Railt\Parser\ParserInterface;
18
-use Railt\Parser\Rule\Token;
19 18
 
20 19
 /**
21 20
  * Class Runtime
Please login to merge, or discard this patch.
src/Reader/Resolver/TokenResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
         $this->tokens[$name] = $value;
44 44
 
45 45
         if ($group !== null) {
46
-            $this->groups[$name] = (int)$group;
46
+            $this->groups[$name] = (int) $group;
47 47
         }
48 48
 
49 49
         if ($token->name() === 'T_SKIP') {
Please login to merge, or discard this patch.
src/Reader/Resolver/RuleResolver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -55,11 +55,11 @@  discard block
 block discarded – undo
55 55
             return;
56 56
         }
57 57
 
58
-        if (! \array_key_exists($this->current, $this->rules)) {
58
+        if (!\array_key_exists($this->current, $this->rules)) {
59 59
             $this->rules[$this->current] = [];
60 60
         }
61 61
 
62
-        if (! \array_key_exists($this->current, $this->files)) {
62
+        if (!\array_key_exists($this->current, $this->files)) {
63 63
             $this->files[$this->current] = $readable;
64 64
         }
65 65
 
@@ -115,13 +115,13 @@  discard block
 block discarded – undo
115 115
      */
116 116
     private function resolveDelegate(string $delegate, Readable $readable, TokenInterface $token): void
117 117
     {
118
-        if (! \class_exists($delegate)) {
118
+        if (!\class_exists($delegate)) {
119 119
             $error = 'Could not found delegate class "%s"';
120 120
             throw (new GrammarException(\sprintf($error, $delegate)))
121 121
                 ->throwsIn($readable, $token->offset());
122 122
         }
123 123
 
124
-        if (! \is_subclass_of($delegate, Delegate::class)) {
124
+        if (!\is_subclass_of($delegate, Delegate::class)) {
125 125
             $error = 'Delegate should be an instance of %s, but %s given';
126 126
             throw (new GrammarException(\sprintf($error, Delegate::class, $delegate)))
127 127
                 ->throwsIn($readable, $token->offset());
Please login to merge, or discard this patch.
src/Reader/Resolver/RulesBuilder.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             $this->stack->push($current = $this->root($rule));
92 92
 
93 93
             while ($iterator->valid()) {
94
-                $this->text .= $iterator->current()->value() . ' ';
94
+                $this->text .= $iterator->current()->value().' ';
95 95
 
96 96
                 $this->reduce($iterator->current(), $iterator);
97 97
                 $iterator->next();
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
      */
189 189
     private function reduceToken(TokenInterface $token, bool $keep): int
190 190
     {
191
-        $key = $token->value(1) . ':' . $token->name();
191
+        $key = $token->value(1).':'.$token->name();
192 192
 
193 193
         $builder = new TokenBuilder($this->getId($key), $token->value(1), $keep);
194 194
 
Please login to merge, or discard this patch.