@@ -104,7 +104,7 @@ |
||
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
| 107 | - * @return iterable|Invocable[]|Compilable[] |
|
| 107 | + * @return \Generator |
|
| 108 | 108 | */ |
| 109 | 109 | public function getInvocableTypes(): iterable |
| 110 | 110 | { |
@@ -254,7 +254,7 @@ |
||
| 254 | 254 | * @param NodeInterface $ast |
| 255 | 255 | * @param string $type |
| 256 | 256 | * @param array $path |
| 257 | - * @return array|float|int|null|string |
|
| 257 | + * @return string |
|
| 258 | 258 | */ |
| 259 | 259 | protected function parseValue(NodeInterface $ast, string $type, array $path = []) |
| 260 | 260 | { |
@@ -170,7 +170,7 @@ |
||
| 170 | 170 | |
| 171 | 171 | // Collect sibling methods |
| 172 | 172 | foreach (\class_uses_recursive(static::class) as $sibling) { |
| 173 | - $method = 'compile' . \class_basename($sibling); |
|
| 173 | + $method = 'compile'.\class_basename($sibling); |
|
| 174 | 174 | |
| 175 | 175 | if (\method_exists($sibling, $method)) { |
| 176 | 176 | $this->siblingActions[] = $method; |
@@ -72,7 +72,7 @@ discard block |
||
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | /** |
| 75 | - * @param Definition|Compilable $instance |
|
| 75 | + * @param Definition $instance |
|
| 76 | 76 | * @return void |
| 77 | 77 | * @throws TypeConflictException |
| 78 | 78 | * @throws \OutOfBoundsException |
@@ -225,7 +225,7 @@ discard block |
||
| 225 | 225 | } |
| 226 | 226 | |
| 227 | 227 | /** |
| 228 | - * @param HasDirectives|BaseDirectivesContainer $original |
|
| 228 | + * @param HasDirectives $original |
|
| 229 | 229 | * @param HasDirectives $extend |
| 230 | 230 | * @return void |
| 231 | 231 | * @throws \OutOfBoundsException |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | { |
| 60 | 60 | $type = DocumentBuilder::AST_TYPE_MAPPING[$ast->getName()] ?? null; |
| 61 | 61 | |
| 62 | - if ($type !== null && ! ($type instanceof ExtendDefinition)) { |
|
| 62 | + if ($type !== null && !($type instanceof ExtendDefinition)) { |
|
| 63 | 63 | /** @var Compilable $virtualType */ |
| 64 | 64 | $virtualType = new $type($ast, $this->getDocument()); |
| 65 | 65 | |
@@ -134,7 +134,7 @@ discard block |
||
| 134 | 134 | continue; |
| 135 | 135 | } |
| 136 | 136 | |
| 137 | - $callee = function () use ($extendField): void { |
|
| 137 | + $callee = function() use ($extendField): void { |
|
| 138 | 138 | /** @var BaseFieldsContainer $this */ |
| 139 | 139 | $this->fields[$extendField->getName()] = $extendField; |
| 140 | 140 | }; |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | private function dataFieldExtender(): \Closure |
| 150 | 150 | { |
| 151 | 151 | /** @var FieldDefinition|BaseField $field */ |
| 152 | - return function (FieldDefinition $field): void { |
|
| 152 | + return function(FieldDefinition $field): void { |
|
| 153 | 153 | /** @var BaseField $this */ |
| 154 | 154 | |
| 155 | 155 | // Extend type |
@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | continue; |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | - $callee = function () use ($extendArgument): void { |
|
| 194 | + $callee = function() use ($extendArgument): void { |
|
| 195 | 195 | /** @var BaseArgumentsContainer $this */ |
| 196 | 196 | $this->arguments[$extendArgument->getName()] = $extendArgument; |
| 197 | 197 | }; |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | private function dataArgumentExtender(): \Closure |
| 207 | 207 | { |
| 208 | 208 | /** @var ArgumentDefinition|BaseArgument $argument */ |
| 209 | - return function (ArgumentDefinition $argument): void { |
|
| 209 | + return function(ArgumentDefinition $argument): void { |
|
| 210 | 210 | /** @var BaseArgument $this */ |
| 211 | 211 | |
| 212 | 212 | // Extend type |
@@ -241,7 +241,7 @@ discard block |
||
| 241 | 241 | continue; |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | - $callee = function () use ($extendDirective): void { |
|
| 244 | + $callee = function() use ($extendDirective): void { |
|
| 245 | 245 | /** @var BaseArgumentsContainer $this */ |
| 246 | 246 | $this->arguments[$extendDirective->getName()] = $extendDirective; |
| 247 | 247 | }; |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | - * @param TypeDefinition|HasPassedArguments|Invocable $type |
|
| 33 | + * @param TypeDefinition $type |
|
| 34 | 34 | */ |
| 35 | 35 | public function apply(TypeDefinition $type): void |
| 36 | 36 | { |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | private function inferenceDefaultArguments(HasArguments $container, HasPassedArguments $usage): void |
| 50 | 50 | { |
| 51 | 51 | foreach ($container->getArguments() as $argument) { |
| 52 | - if ($argument->hasDefaultValue() && ! $usage->hasPassedArgument($argument->getName())) { |
|
| 52 | + if ($argument->hasDefaultValue() && !$usage->hasPassedArgument($argument->getName())) { |
|
| 53 | 53 | $this->set($usage, $argument->getName(), $argument->getDefaultValue()); |
| 54 | 54 | } |
| 55 | 55 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | */ |
| 63 | 63 | private function set(HasPassedArguments $usage, string $key, $value): void |
| 64 | 64 | { |
| 65 | - $invocation = function (string $key, $value): void { |
|
| 65 | + $invocation = function(string $key, $value): void { |
|
| 66 | 66 | /** @var BaseInputInvocation $this */ |
| 67 | 67 | $this->arguments[$key] = $value; |
| 68 | 68 | }; |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | /** |
| 91 | 91 | * @param string $type |
| 92 | - * @return iterable|TypeDefinition[] |
|
| 92 | + * @return \Generator |
|
| 93 | 93 | */ |
| 94 | 94 | public function only(string $type): iterable |
| 95 | 95 | { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | |
| 103 | 103 | /** |
| 104 | - * @return iterable|TypeDefinition[] |
|
| 104 | + * @return \Generator |
|
| 105 | 105 | */ |
| 106 | 106 | public function all(): iterable |
| 107 | 107 | { |
@@ -51,7 +51,7 @@ |
||
| 51 | 51 | */ |
| 52 | 52 | public function register(TypeDefinition $type, bool $force = false): Dictionary |
| 53 | 53 | { |
| 54 | - if (! $force && $this->has($type->getName())) { |
|
| 54 | + if (!$force && $this->has($type->getName())) { |
|
| 55 | 55 | $error = \sprintf( |
| 56 | 56 | 'Can not declare %s, because the name %s already in use', |
| 57 | 57 | $this->typeToString($type), |
@@ -34,8 +34,8 @@ discard block |
||
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
| 38 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
| 37 | + * @param TypeDefinition $child |
|
| 38 | + * @param TypeDefinition $parent |
|
| 39 | 39 | * @return void |
| 40 | 40 | * @throws TypeConflictException |
| 41 | 41 | */ |
@@ -52,8 +52,8 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
| 56 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
| 55 | + * @param TypeDefinition $child |
|
| 56 | + * @param TypeDefinition $parent |
|
| 57 | 57 | * @return bool |
| 58 | 58 | */ |
| 59 | 59 | protected function isEqualType(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -63,8 +63,8 @@ discard block |
||
| 63 | 63 | } |
| 64 | 64 | |
| 65 | 65 | /** |
| 66 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
| 67 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
| 66 | + * @param TypeDefinition $child |
|
| 67 | + * @param TypeDefinition $parent |
|
| 68 | 68 | * @return bool |
| 69 | 69 | */ |
| 70 | 70 | protected function isSameType(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | class EnumValidator extends BaseInheritanceValidator |
| 21 | 21 | { |
| 22 | 22 | /** |
| 23 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
| 24 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
| 23 | + * @param TypeDefinition $child |
|
| 24 | + * @param TypeDefinition $parent |
|
| 25 | 25 | * @return bool |
| 26 | 26 | */ |
| 27 | 27 | public function match(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
| 35 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
| 34 | + * @param TypeDefinition $child |
|
| 35 | + * @param TypeDefinition $parent |
|
| 36 | 36 | * @return void |
| 37 | 37 | * @throws TypeConflictException |
| 38 | 38 | */ |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | \assert($parent->getTypeDefinition() instanceof EnumDefinition); |
| 42 | 42 | |
| 43 | - if (! $this->isEqualType($child, $parent)) { |
|
| 43 | + if (!$this->isEqualType($child, $parent)) { |
|
| 44 | 44 | $this->throwIncompatibleTypes($child, $parent); |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -20,8 +20,8 @@ discard block |
||
| 20 | 20 | class InputValidator extends BaseInheritanceValidator |
| 21 | 21 | { |
| 22 | 22 | /** |
| 23 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
| 24 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
| 23 | + * @param TypeDefinition $child |
|
| 24 | + * @param TypeDefinition $parent |
|
| 25 | 25 | * @return bool |
| 26 | 26 | */ |
| 27 | 27 | public function match(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -31,8 +31,8 @@ discard block |
||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
| 35 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
| 34 | + * @param TypeDefinition $child |
|
| 35 | + * @param TypeDefinition $parent |
|
| 36 | 36 | * @return void |
| 37 | 37 | * @throws TypeConflictException |
| 38 | 38 | */ |
@@ -40,7 +40,7 @@ |
||
| 40 | 40 | { |
| 41 | 41 | \assert($parent->getTypeDefinition() instanceof InputDefinition); |
| 42 | 42 | |
| 43 | - if (! $this->isEqualType($child, $parent)) { |
|
| 43 | + if (!$this->isEqualType($child, $parent)) { |
|
| 44 | 44 | $this->throwIncompatibleTypes($child, $parent); |
| 45 | 45 | } |
| 46 | 46 | } |
@@ -21,8 +21,8 @@ discard block |
||
| 21 | 21 | class InterfaceValidator extends BaseInheritanceValidator |
| 22 | 22 | { |
| 23 | 23 | /** |
| 24 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
| 25 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
| 24 | + * @param TypeDefinition $child |
|
| 25 | + * @param TypeDefinition $parent |
|
| 26 | 26 | * @return bool |
| 27 | 27 | */ |
| 28 | 28 | public function match(TypeDefinition $child, TypeDefinition $parent): bool |
@@ -32,8 +32,8 @@ discard block |
||
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | /** |
| 35 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
| 36 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
| 35 | + * @param TypeDefinition $child |
|
| 36 | + * @param TypeDefinition $parent |
|
| 37 | 37 | * @return void |
| 38 | 38 | * @throws TypeConflictException |
| 39 | 39 | */ |
@@ -53,8 +53,8 @@ discard block |
||
| 53 | 53 | } |
| 54 | 54 | |
| 55 | 55 | /** |
| 56 | - * @param AllowsTypeIndication|TypeDefinition $child |
|
| 57 | - * @param AllowsTypeIndication|TypeDefinition $parent |
|
| 56 | + * @param TypeDefinition $child |
|
| 57 | + * @param TypeDefinition $parent |
|
| 58 | 58 | * @return void |
| 59 | 59 | * @throws TypeConflictException |
| 60 | 60 | */ |
@@ -63,7 +63,7 @@ |
||
| 63 | 63 | /** @var ObjectDefinition $object */ |
| 64 | 64 | $object = $child->getTypeDefinition(); |
| 65 | 65 | |
| 66 | - if (! $object->hasInterface($parent->getTypeDefinition()->getName())) { |
|
| 66 | + if (!$object->hasInterface($parent->getTypeDefinition()->getName())) { |
|
| 67 | 67 | $error = \vsprintf('%s in %s definition must be instance of %s', [ |
| 68 | 68 | $object, $child, |
| 69 | 69 | $parent->getTypeDefinition(), |