@@ -11,8 +11,6 @@ discard block |
||
11 | 11 | |
12 | 12 | use Railt\Io\Readable; |
13 | 13 | use Railt\Parser\Ast\RuleInterface; |
14 | -use Railt\Parser\Environment; |
|
15 | -use Railt\Parser\Exception\UnexpectedTokenException; |
|
16 | 14 | use Railt\Parser\Exception\UnrecognizedTokenException; |
17 | 15 | use Railt\Reflection\Contracts\Definition; |
18 | 16 | use Railt\Reflection\Contracts\Dictionary; |
@@ -22,7 +20,6 @@ discard block |
||
22 | 20 | use Railt\Reflection\Document; |
23 | 21 | use Railt\Reflection\Reflection; |
24 | 22 | use Railt\SDL\Compiler\Parser; |
25 | -use Railt\SDL\Compiler\Pipeline; |
|
26 | 23 | use Railt\SDL\Compiler\Factory; |
27 | 24 | use Railt\SDL\Exception\CompilerException; |
28 | 25 | use Railt\SDL\Exception\SyntaxException; |
@@ -16,7 +16,6 @@ |
||
16 | 16 | use Railt\Reflection\Contracts\Definition\TypeDefinition; |
17 | 17 | use Railt\Reflection\Contracts\Document; |
18 | 18 | use Railt\SDL\Compiler\Ast\TypeNameNode; |
19 | -use Railt\SDL\Compiler\Ast\Value\ValueInterface; |
|
20 | 19 | |
21 | 20 | /** |
22 | 21 | * Class TypeDefinitionNode |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | class InputValueNode extends Rule implements ValueInterface, CompositeValueInterface |
19 | 19 | { |
20 | 20 | /** |
21 | - * @return iterable |
|
21 | + * @return \Generator |
|
22 | 22 | */ |
23 | 23 | public function toPrimitive(): iterable |
24 | 24 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | |
30 | 30 | /** |
31 | - * @return iterable|ValueInterface[] |
|
31 | + * @return \Generator |
|
32 | 32 | */ |
33 | 33 | public function getValues(): iterable |
34 | 34 | { |
@@ -7,7 +7,7 @@ discard block |
||
7 | 7 | */ |
8 | 8 | declare(strict_types=1); |
9 | 9 | |
10 | -if (! \function_exists('\\sdl')) { |
|
10 | +if (!\function_exists('\\sdl')) { |
|
11 | 11 | /** |
12 | 12 | * @param string $fileOrSources |
13 | 13 | * @param bool $filename |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | } |
26 | 26 | |
27 | 27 | |
28 | -if (! function_exists('trait_uses_recursive')) { |
|
28 | +if (!function_exists('trait_uses_recursive')) { |
|
29 | 29 | /** |
30 | 30 | * Returns all traits used by a trait and its traits. |
31 | 31 | * |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | } |
46 | 46 | |
47 | 47 | |
48 | -if (! function_exists('class_uses_recursive')) { |
|
48 | +if (!function_exists('class_uses_recursive')) { |
|
49 | 49 | /** |
50 | 50 | * Returns all traits used by a class, its parent classes and trait of their traits. |
51 | 51 | * |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | } |
70 | 70 | |
71 | 71 | |
72 | -if (! function_exists('class_basename')) { |
|
72 | +if (!function_exists('class_basename')) { |
|
73 | 73 | /** |
74 | 74 | * Get the class "basename" of the given object / class. |
75 | 75 | * |
@@ -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\\Compiler') |
46 | - ->saveTo(__DIR__ . '/../Compiler'); |
|
46 | + ->saveTo(__DIR__.'/../Compiler'); |
|
47 | 47 | |
48 | 48 | $this->info('OK'); |
49 | 49 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | /** @var InputDefinition $input */ |
30 | 30 | $input = $ast->getTypeDefinition(); |
31 | 31 | |
32 | - $this->immediately(function () use ($ast, $input) { |
|
32 | + $this->immediately(function() use ($ast, $input) { |
|
33 | 33 | $input->withOffset($ast->getOffset()); |
34 | 34 | $input->withDescription($ast->getDescription()); |
35 | 35 | }); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | /** @var EnumDefinition $enum */ |
30 | 30 | $enum = $ast->getTypeDefinition(); |
31 | 31 | |
32 | - $this->immediately(function () use ($ast, $enum) { |
|
32 | + $this->immediately(function() use ($ast, $enum) { |
|
33 | 33 | $enum->withOffset($ast->getOffset()); |
34 | 34 | $enum->withDescription($ast->getDescription()); |
35 | 35 | }); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | /** @var DirectiveDefinition $directive */ |
30 | 30 | $directive = $ast->getTypeDefinition(); |
31 | 31 | |
32 | - $this->immediately(function () use ($ast, $directive) { |
|
32 | + $this->immediately(function() use ($ast, $directive) { |
|
33 | 33 | $directive->withOffset($ast->getOffset()); |
34 | 34 | $directive->withDescription($ast->getDescription()); |
35 | 35 | }); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | /** @var ScalarDefinition $scalar */ |
30 | 30 | $scalar = $ast->getTypeDefinition(); |
31 | 31 | |
32 | - $this->immediately(function () use ($ast, $scalar) { |
|
32 | + $this->immediately(function() use ($ast, $scalar) { |
|
33 | 33 | $scalar->withOffset($ast->getOffset()); |
34 | 34 | $scalar->withDescription($ast->getDescription()); |
35 | 35 | }); |