Passed
Branch master (ab19ac)
by Kirill
05:59
created
src/Lexer/Result/BaseToken.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * For the full copyright and license information, please view the LICENSE
6 6
  * file that was distributed with this source code.
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace Railt\Compiler\Lexer\Result;
11 11
 
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function __toString(): string
33 33
     {
34
-        $format = function (string $value) {
35
-            $value = (string)(\preg_replace('/\s+/iu', ' ', $value) ?? $value);
34
+        $format = function(string $value) {
35
+            $value = (string) (\preg_replace('/\s+/iu', ' ', $value) ?? $value);
36 36
             $value = \addcslashes($value, '"');
37 37
 
38 38
             if (\mb_strlen($value) > 35) {
39
-                $value = \mb_substr($value, 0, 30) .
39
+                $value = \mb_substr($value, 0, 30).
40 40
                     \sprintf('… (%s+)', \mb_strlen($value) - 30);
41 41
             }
42 42
 
Please login to merge, or discard this patch.
src/Lexer/Result/Unknown.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * For the full copyright and license information, please view the LICENSE
6 6
  * file that was distributed with this source code.
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace Railt\Compiler\Lexer\Result;
11 11
 
Please login to merge, or discard this patch.
src/Lexer/Result/Token.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * For the full copyright and license information, please view the LICENSE
6 6
  * file that was distributed with this source code.
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace Railt\Compiler\Lexer\Result;
11 11
 
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     public function __construct(string $name, $value, int $offset = 0)
39 39
     {
40 40
         $this->name   = $name;
41
-        $this->value  = (array)$value;
41
+        $this->value  = (array) $value;
42 42
         $this->offset = $offset;
43 43
     }
44 44
 
Please login to merge, or discard this patch.
src/Lexer/Result/Eoi.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * For the full copyright and license information, please view the LICENSE
6 6
  * file that was distributed with this source code.
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace Railt\Compiler\Lexer\Result;
11 11
 
Please login to merge, or discard this patch.
src/Lexer/ParleStateless.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * For the full copyright and license information, please view the LICENSE
6 6
  * file that was distributed with this source code.
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace Railt\Compiler\Lexer;
11 11
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function __construct()
58 58
     {
59
-        if (! \class_exists(Lexer::class)) {
59
+        if (!\class_exists(Lexer::class)) {
60 60
             throw new UnsupportedLexerRuntimeException('This runtime required parle extension');
61 61
         }
62 62
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
             $this->map[$this->id]    = $name;
78 78
             $this->tokens[$this->id] = $pcre;
79 79
         } catch (LexerException $e) {
80
-            $message = \preg_replace('/rule\h+id\h+\d+/iu', 'token ' . $name, $e->getMessage());
80
+            $message = \preg_replace('/rule\h+id\h+\d+/iu', 'token '.$name, $e->getMessage());
81 81
 
82 82
             throw new BadLexemeException($message);
83 83
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     public function lex(Readable $input): \Traversable
116 116
     {
117 117
         foreach ($this->exec($input) as $token) {
118
-            if (! \in_array($token->name(), $this->skip, true)) {
118
+            if (!\in_array($token->name(), $this->skip, true)) {
119 119
                 yield $token;
120 120
             }
121 121
         }
Please login to merge, or discard this patch.
src/Lexer/NativeStateful.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * For the full copyright and license information, please view the LICENSE
6 6
  * file that was distributed with this source code.
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace Railt\Compiler\Lexer;
11 11
 
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
     public function lex(Readable $input): \Traversable
50 50
     {
51 51
         foreach ($this->exec($this->pattern, $input->getContents()) as $token) {
52
-            if (! \in_array($token->name(), $this->skipped, true)) {
52
+            if (!\in_array($token->name(), $this->skipped, true)) {
53 53
                 yield $token;
54 54
             }
55 55
         }
Please login to merge, or discard this patch.
src/Lexer/Common/PCRECompiler.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
  * For the full copyright and license information, please view the LICENSE
6 6
  * file that was distributed with this source code.
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace Railt\Compiler\Lexer\Common;
11 11
 
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
             $message = \error_get_last()['message'] ?? \sprintf('Unprocessable PCRE %s', $pcre);
70 70
             $message = \str_replace('preg_match(): Compilation failed: ', '', $message);
71 71
 
72
-            throw new BadLexemeException('Unprocessable PCRE (' . $message . ')');
72
+            throw new BadLexemeException('Unprocessable PCRE ('.$message.')');
73 73
         }
74 74
 
75 75
         return true;
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     private function flags(): string
91 91
     {
92
-        return self::FLAG_UNICODE . self::FLAG_DOT_ALL . self::FLAG_ANALYZED;
92
+        return self::FLAG_UNICODE.self::FLAG_DOT_ALL.self::FLAG_ANALYZED;
93 93
     }
94 94
 
95 95
     /**
@@ -175,6 +175,6 @@  discard block
 block discarded – undo
175 175
      */
176 176
     private function escapeString(string $value): string
177 177
     {
178
-        return \str_replace(self::REGEX_DELIMITER, '\\' . self::REGEX_DELIMITER, $value);
178
+        return \str_replace(self::REGEX_DELIMITER, '\\'.self::REGEX_DELIMITER, $value);
179 179
     }
180 180
 }
Please login to merge, or discard this patch.
src/TokenInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * For the full copyright and license information, please view the LICENSE
6 6
  * file that was distributed with this source code.
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace Railt\Compiler;
11 11
 
Please login to merge, or discard this patch.
src/Exception/CustomErrorPosition.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
  * For the full copyright and license information, please view the LICENSE
6 6
  * file that was distributed with this source code.
7 7
  */
8
-declare(strict_types=1);
8
+declare(strict_types = 1);
9 9
 
10 10
 namespace Railt\Compiler\Exception;
11 11
 
Please login to merge, or discard this patch.