@@ -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 | { |
@@ -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 | |
@@ -21,7 +21,7 @@ discard block |
||
| 21 | 21 | */ |
| 22 | 22 | public function toString(): string |
| 23 | 23 | { |
| 24 | - $values = \array_map(function (ValueInterface $value) { |
|
| 24 | + $values = \array_map(function(ValueInterface $value) { |
|
| 25 | 25 | return $value->toString(); |
| 26 | 26 | }, \iterator_to_array($this->getValues())); |
| 27 | 27 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | public function toPrimitive(): iterable |
| 35 | 35 | { |
| 36 | - return \array_map(function (ValueInterface $value) { |
|
| 36 | + return \array_map(function(ValueInterface $value) { |
|
| 37 | 37 | return $value->toPrimitive(); |
| 38 | 38 | }, \iterator_to_array($this->getValues())); |
| 39 | 39 | } |
@@ -31,6 +31,6 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function getType(): TypeInterface |
| 33 | 33 | { |
| 34 | - return Type::of(Type::INTERFACE); |
|
| 34 | + return Type::of(Type::interface); |
|
| 35 | 35 | } |
| 36 | 36 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | * @param TypeDefinition $type |
| 38 | 38 | * @return bool |
| 39 | 39 | */ |
| 40 | - public function instanceOf(TypeDefinition $type): bool; |
|
| 40 | + public function instanceof(TypeDefinition $type): bool; |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * @param TypeInterface $type |
@@ -127,7 +127,7 @@ |
||
| 127 | 127 | public function __toString(): string |
| 128 | 128 | { |
| 129 | 129 | if ($this->representation === null) { |
| 130 | - return '? of ' . $this->getType(); |
|
| 130 | + return '? of '.$this->getType(); |
|
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | return $this->representation; |
@@ -108,7 +108,7 @@ |
||
| 108 | 108 | * @param TypeDefinition $type |
| 109 | 109 | * @return bool |
| 110 | 110 | */ |
| 111 | - public function instanceOf(TypeDefinition $type): bool |
|
| 111 | + public function instanceof(TypeDefinition $type): bool |
|
| 112 | 112 | { |
| 113 | 113 | return $this->type->instanceOf($type); |
| 114 | 114 | } |