@@ -18,7 +18,7 @@ |
||
| 18 | 18 | trait FieldsProvider |
| 19 | 19 | { |
| 20 | 20 | /** |
| 21 | - * @return iterable|FieldDefinitionNode[] |
|
| 21 | + * @return \Generator |
|
| 22 | 22 | */ |
| 23 | 23 | public function getFieldNodes(): iterable |
| 24 | 24 | { |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | trait InterfacesProvider |
| 19 | 19 | { |
| 20 | 20 | /** |
| 21 | - * @return iterable|TypeNameNode[] |
|
| 21 | + * @return \Generator |
|
| 22 | 22 | */ |
| 23 | 23 | public function getInterfaceNodes(): iterable |
| 24 | 24 | { |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | - * @return iterable|ValueInterface[] |
|
| 51 | + * @return \Generator |
|
| 52 | 52 | */ |
| 53 | 53 | public function getValues(): iterable |
| 54 | 54 | { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | $result = []; |
| 28 | 28 | |
| 29 | 29 | foreach ($this->getValues() as $key => $value) { |
| 30 | - $result[] = $key->getValue() . ': ' . $value->toString(); |
|
| 30 | + $result[] = $key->getValue().': '.$value->toString(); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | return \sprintf('{%s}', \implode(', ', $result)); |
@@ -32,8 +32,8 @@ |
||
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * @param Readable $file |
| 35 | - * @param RuleInterface|ProvidesType|ProvidesName $ast |
|
| 36 | - * @return \Generator|mixed |
|
| 35 | + * @param RuleInterface $ast |
|
| 36 | + * @return \Generator |
|
| 37 | 37 | */ |
| 38 | 38 | public function apply(Readable $file, RuleInterface $ast) |
| 39 | 39 | { |
@@ -21,7 +21,7 @@ discard block |
||
| 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 |
||
| 43 | 43 | Compiler::load(File::fromPathname(self::SCHEMA_SDL_GRAMMAR)) |
| 44 | 44 | ->setClassName('Parser') |
| 45 | 45 | ->setNamespace('Railt\\SDL\\Frontend') |
| 46 | - ->saveTo(__DIR__ . '/../Frontend'); |
|
| 46 | + ->saveTo(__DIR__.'/../Frontend'); |
|
| 47 | 47 | |
| 48 | 48 | $this->info('OK'); |
| 49 | 49 | } |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | */ |
| 41 | 41 | private function trim(string $content): string |
| 42 | 42 | { |
| 43 | - $lines = \array_map(function (string $line): string { |
|
| 43 | + $lines = \array_map(function(string $line): string { |
|
| 44 | 44 | return \ltrim($line, '#'); |
| 45 | 45 | }, \explode("\n", $content)); |
| 46 | 46 | |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | */ |
| 24 | 24 | public function toString(): string |
| 25 | 25 | { |
| 26 | - return (string)$this->toPrimitive(); |
|
| 26 | + return (string) $this->toPrimitive(); |
|
| 27 | 27 | } |
| 28 | 28 | |
| 29 | 29 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | return $this->parseInt($value->getValue()); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | - return (float)$value->getValue(); |
|
| 62 | + return (float) $value->getValue(); |
|
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | */ |
| 114 | 114 | private function parseExponential(string $value): float |
| 115 | 115 | { |
| 116 | - return (float)$value; |
|
| 116 | + return (float) $value; |
|
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | /** |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | */ |
| 132 | 132 | private function parseFloat(string $value): float |
| 133 | 133 | { |
| 134 | - return (float)$value; |
|
| 134 | + return (float) $value; |
|
| 135 | 135 | } |
| 136 | 136 | |
| 137 | 137 | /** |
@@ -21,7 +21,7 @@ |
||
| 21 | 21 | */ |
| 22 | 22 | public function toPrimitive(): string |
| 23 | 23 | { |
| 24 | - return (string)$this->getChild(0)->getValue(); |
|
| 24 | + return (string) $this->getChild(0)->getValue(); |
|
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | /** |
@@ -93,7 +93,7 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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) { |