Completed
Push — master ( 957ceb...9ec3d9 )
by Kirill
02:06
created
src/Iterator/LookaheadIterator.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
     }
78 78
 
79 79
     /**
80
-     * @return int|mixed
80
+     * @return integer
81 81
      */
82 82
     public function key()
83 83
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
      */
102 102
     public function next(): void
103 103
     {
104
-        $this->valid  = $this->iterator->valid();
104
+        $this->valid = $this->iterator->valid();
105 105
 
106 106
         if ($this->valid === false) {
107 107
             return;
Please login to merge, or discard this patch.
src/Reader/BasePragmas.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@
 block discarded – undo
133 133
      */
134 134
     protected function set(string $group, string $name, string $value): void
135 135
     {
136
-        if (! \array_key_exists($group, $this->configs)) {
136
+        if (!\array_key_exists($group, $this->configs)) {
137 137
             $this->configs[$group] = [];
138 138
         }
139 139
 
Please login to merge, or discard this patch.
src/Reader/Config.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function __construct(string $prefix, array $allowed)
33 33
     {
34
-        $this->prefix  = \trim($prefix, '.') . '.';
34
+        $this->prefix  = \trim($prefix, '.').'.';
35 35
         $this->allowed = $allowed;
36 36
     }
37 37
 
Please login to merge, or discard this patch.
src/Reader/BaseRules.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -64,12 +64,12 @@
 block discarded – undo
64 64
      */
65 65
     protected function addDelegate(string $rule, string $delegate): void
66 66
     {
67
-        if (! \class_exists($delegate)) {
67
+        if (!\class_exists($delegate)) {
68 68
             $error = 'Could not found delegate class "%s"';
69 69
             throw new GrammarException(\sprintf($error, $delegate));
70 70
         }
71 71
 
72
-        if (! \is_subclass_of($delegate, Delegate::class)) {
72
+        if (!\is_subclass_of($delegate, Delegate::class)) {
73 73
             $error = 'Delegate should be an instance of %s, but %s given';
74 74
             throw new GrammarException(\sprintf($error, Delegate::class, $delegate));
75 75
         }
Please login to merge, or discard this patch.
src/Reader/BaseTokens.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     public function isKeep(string $token): bool
71 71
     {
72
-        return ! \in_array($token, $this->skipped, true);
72
+        return !\in_array($token, $this->skipped, true);
73 73
     }
74 74
 
75 75
     /**
Please login to merge, or discard this patch.
src/Reader/Runtime.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
         $lexer = new NativeStateless();
72 72
 
73 73
         foreach ($this->tokens->all() as $name => $pcre) {
74
-            $lexer->add($name, $pcre, ! $this->tokens->isKeep($name));
74
+            $lexer->add($name, $pcre, !$this->tokens->isKeep($name));
75 75
         }
76 76
 
77 77
         return $lexer;
Please login to merge, or discard this patch.
src/Grammar/PP2/Mapping.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
             return $this->lastId++;
35 35
         }
36 36
 
37
-        if (! $this->has($rule)) {
37
+        if (!$this->has($rule)) {
38 38
             $this->mappings[$rule] = $this->lastId++;
39 39
         }
40 40
 
Please login to merge, or discard this patch.
src/Grammar/PP2.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,6 @@
 block discarded – undo
9 9
 
10 10
 namespace Railt\Compiler\Grammar;
11 11
 
12
-use Railt\Compiler\Grammar\PP2\Lexer;
13 12
 use Railt\Compiler\Grammar\PP2\Parser;
14 13
 use Railt\Compiler\Reader\GrammarInterface;
15 14
 use Railt\Compiler\Reader\Result;
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,16 +54,16 @@  discard block
 block discarded – undo
54 54
         foreach ($this->parse($grammar) as $rule) {
55 55
             switch ($rule->getName()) {
56 56
                 case 'Pragma':
57
-                    echo \get_class($rule) . "\n";
57
+                    echo \get_class($rule)."\n";
58 58
                     break;
59 59
                 case 'Include':
60
-                    echo \get_class($rule) . "\n";
60
+                    echo \get_class($rule)."\n";
61 61
                     break;
62 62
                 case 'Rule':
63
-                    echo \get_class($rule) . "\n";
63
+                    echo \get_class($rule)."\n";
64 64
                     break;
65 65
                 case 'Token':
66
-                    echo \get_class($rule) . "\n";
66
+                    echo \get_class($rule)."\n";
67 67
                     break;
68 68
             }
69 69
         }
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     public function make(): Result
90 90
     {
91 91
         foreach ($this->ast as $rule) {
92
-            echo $rule . "\n\n";
92
+            echo $rule."\n\n";
93 93
         }
94 94
         die;
95 95
     }
Please login to merge, or discard this patch.
src/Grammar/PP2/Delegate/RuleDelegate.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,6 +19,6 @@
 block discarded – undo
19 19
 {
20 20
     public function reduce(): Symbol
21 21
     {
22
-        throw new \LogicException('The ' . __METHOD__ . ' not implemented yet');
22
+        throw new \LogicException('The '.__METHOD__.' not implemented yet');
23 23
     }
24 24
 }
Please login to merge, or discard this patch.