@@ -30,6 +30,6 @@ |
||
30 | 30 | */ |
31 | 31 | public static function match(string $lexeme, string $value): bool |
32 | 32 | { |
33 | - return (bool)\preg_match(self::pattern($lexeme), $value); |
|
33 | + return (bool) \preg_match(self::pattern($lexeme), $value); |
|
34 | 34 | } |
35 | 35 | } |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | /** |
22 | 22 | * @var string |
23 | 23 | */ |
24 | - private const SCHEMA_SDL_GRAMMAR = __DIR__ . '/../../resources/sdl/grammar.pp2'; |
|
24 | + private const SCHEMA_SDL_GRAMMAR = __DIR__.'/../../resources/sdl/grammar.pp2'; |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * @var string |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | Compiler::load(File::fromPathname(self::SCHEMA_SDL_GRAMMAR)) |
44 | 44 | ->setClassName('BaseParser') |
45 | 45 | ->setNamespace('Railt\\SDL\\Frontend') |
46 | - ->saveTo(__DIR__ . '/../Frontend'); |
|
46 | + ->saveTo(__DIR__.'/../Frontend'); |
|
47 | 47 | |
48 | 48 | $this->info('OK'); |
49 | 49 | } |
@@ -55,7 +55,7 @@ |
||
55 | 55 | */ |
56 | 56 | public function throwsIn(Readable $file, int $offsetOrLine = 0, int $column = null): ExternalExceptionInterface |
57 | 57 | { |
58 | - if (! $this->defined) { |
|
58 | + if (!$this->defined) { |
|
59 | 59 | $this->defined = true; |
60 | 60 | |
61 | 61 | return parent::throwsIn($file, $offsetOrLine, $column); |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | case $value instanceof \JsonSerializable: |
132 | 132 | break; |
133 | 133 | case \is_object($value) && \method_exists($value, '__toString'): |
134 | - $value = (string)$value; |
|
134 | + $value = (string) $value; |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | $result[$key] = $value; |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | */ |
165 | 165 | public function offsetExists($offset): bool |
166 | 166 | { |
167 | - return $this->has((string)$offset); |
|
167 | + return $this->has((string) $offset); |
|
168 | 168 | } |
169 | 169 | |
170 | 170 | /** |
@@ -173,7 +173,7 @@ discard block |
||
173 | 173 | */ |
174 | 174 | public function offsetGet($offset) |
175 | 175 | { |
176 | - return $this->get((string)$offset); |
|
176 | + return $this->get((string) $offset); |
|
177 | 177 | } |
178 | 178 | |
179 | 179 | /** |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $offset = \count($this->attributes); |
187 | 187 | } |
188 | 188 | |
189 | - $this->set((string)$offset, $value); |
|
189 | + $this->set((string) $offset, $value); |
|
190 | 190 | } |
191 | 191 | |
192 | 192 | /** |
@@ -194,6 +194,6 @@ discard block |
||
194 | 194 | */ |
195 | 195 | public function offsetUnset($offset): void |
196 | 196 | { |
197 | - $this->delete((string)$offset); |
|
197 | + $this->delete((string) $offset); |
|
198 | 198 | } |
199 | 199 | } |
@@ -45,7 +45,7 @@ |
||
45 | 45 | $name = yield $rule->first('> #TypeName'); |
46 | 46 | |
47 | 47 | yield $this->deferred($ctx, yield $rule->first('> #TypeName')) |
48 | - ->then(function (ContextInterface $context) use ($name, $rule) { |
|
48 | + ->then(function(ContextInterface $context) use ($name, $rule) { |
|
49 | 49 | return $this->then($context, $rule, $name); |
50 | 50 | }); |
51 | 51 | } |
@@ -35,7 +35,7 @@ |
||
35 | 35 | */ |
36 | 36 | public function reduce(ContextInterface $ctx, RuleInterface $rule) |
37 | 37 | { |
38 | - yield function () use ($ctx, $rule): \Generator { |
|
38 | + yield function() use ($ctx, $rule): \Generator { |
|
39 | 39 | /** @var ValueInterface $value */ |
40 | 40 | $value = yield $rule->first('> #VariableValue')->getChild(0); |
41 | 41 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | */ |
42 | 42 | public function match($value): bool |
43 | 43 | { |
44 | - return (bool)($this->matcher)($value); |
|
44 | + return (bool) ($this->matcher)($value); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | /** |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | * @param TypeInterface|null $type |
129 | 129 | * @return VarSymbolInterface |
130 | 130 | */ |
131 | - public function declare(string $var, TypeInterface $type = null): VarSymbolInterface |
|
131 | + public function declare(string$var,TypeInterface$type=null): VarSymbolInterface |
|
132 | 132 | { |
133 | 133 | if ($this->has($var)) { |
134 | 134 | $error = 'Can not define var $%s, because %s already has been defined'; |
@@ -176,6 +176,6 @@ discard block |
||
176 | 176 | */ |
177 | 177 | public function __toString(): string |
178 | 178 | { |
179 | - return $this->getName()->getFullyQualifiedName() . ' (' . $this->getFile()->getPathname() .')'; |
|
179 | + return $this->getName()->getFullyQualifiedName().' ('.$this->getFile()->getPathname().')'; |
|
180 | 180 | } |
181 | 181 | } |
@@ -81,7 +81,7 @@ |
||
81 | 81 | $arguments = []; |
82 | 82 | |
83 | 83 | foreach ($this->arguments as $name => $value) { |
84 | - $arguments[] = $name . ': ' . $value; |
|
84 | + $arguments[] = $name.': '.$value; |
|
85 | 85 | } |
86 | 86 | |
87 | 87 | return \sprintf('%s<%s>', $this->name->getFullyQualifiedName(), \implode(', ', $arguments)); |