@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function isNonNull(): bool |
| 39 | 39 | { |
| 40 | - return (bool)($this->modifiers & static::IS_NOT_NULL); |
|
| 40 | + return (bool) ($this->modifiers & static::IS_NOT_NULL); |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | */ |
| 46 | 46 | public function isList(): bool |
| 47 | 47 | { |
| 48 | - return (bool)($this->modifiers & static::IS_LIST); |
|
| 48 | + return (bool) ($this->modifiers & static::IS_LIST); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | */ |
| 54 | 54 | public function isListOfNonNulls(): bool |
| 55 | 55 | { |
| 56 | - return (bool)($this->modifiers & static::IS_LIST_OF_NOT_NULL); |
|
| 56 | + return (bool) ($this->modifiers & static::IS_LIST_OF_NOT_NULL); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | /** |
@@ -151,7 +151,7 @@ |
||
| 151 | 151 | /** |
| 152 | 152 | * {@inheritDoc} |
| 153 | 153 | */ |
| 154 | - public function instanceOf(TypeInterface $type): bool |
|
| 154 | + public function instanceof(TypeInterface $type): bool |
|
| 155 | 155 | { |
| 156 | 156 | $needle = $type->getName(); |
| 157 | 157 | |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | */ |
| 79 | 79 | private function bootInheritance(\SplStack $stack, array $children = []): void |
| 80 | 80 | { |
| 81 | - $push = function (string $type) use ($stack): void { |
|
| 81 | + $push = function(string $type) use ($stack): void { |
|
| 82 | 82 | self::$inheritance[$type] = \array_values(\iterator_to_array($stack)); |
| 83 | 83 | self::$inheritance[$type][] = static::ROOT_TYPE; |
| 84 | 84 | |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | /** |
| 38 | 38 | * @var string |
| 39 | 39 | */ |
| 40 | - public const INTERFACE = 'Interface'; |
|
| 40 | + public const interface = 'Interface'; |
|
| 41 | 41 | |
| 42 | 42 | /** |
| 43 | 43 | * @var string |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | self::SCHEMA, |
| 120 | 120 | self::SCALAR, |
| 121 | 121 | self::OBJECT, |
| 122 | - self::INTERFACE, |
|
| 122 | + self::interface, |
|
| 123 | 123 | self::UNION, |
| 124 | 124 | self::ENUM, |
| 125 | 125 | self::INPUT_OBJECT, |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | public const ALLOWS_TO_OUTPUT = [ |
| 148 | 148 | self::SCALAR, |
| 149 | 149 | self::OBJECT, |
| 150 | - self::INTERFACE, |
|
| 150 | + self::interface, |
|
| 151 | 151 | self::UNION, |
| 152 | 152 | self::ENUM, |
| 153 | 153 | self::INPUT_OBJECT, |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | * @var string[]|array[] |
| 165 | 165 | */ |
| 166 | 166 | public const INHERITANCE_TREE = [ |
| 167 | - self::INTERFACE => [ |
|
| 167 | + self::interface => [ |
|
| 168 | 168 | self::OBJECT => [ |
| 169 | 169 | self::INPUT_OBJECT, |
| 170 | 170 | ], |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | * @param TypeInterface $type |
| 217 | 217 | * @return bool |
| 218 | 218 | */ |
| 219 | - public function instanceOf(self $type): bool; |
|
| 219 | + public function instanceof(self $type): bool; |
|
| 220 | 220 | |
| 221 | 221 | /** |
| 222 | 222 | * Returns true if the type is the same as the current type. |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | |
| 59 | 59 | /** |
| 60 | 60 | * @param iterable|Definition[] $ir |
| 61 | - * @return iterable|Definition[] |
|
| 61 | + * @return \Generator |
|
| 62 | 62 | * @throws Exception\InternalException |
| 63 | 63 | */ |
| 64 | 64 | private function validate(iterable $ir): iterable |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * @param Readable $file |
| 41 | - * @param iterable $ir |
|
| 41 | + * @param \Generator $ir |
|
| 42 | 42 | * @return Document |
| 43 | 43 | */ |
| 44 | 44 | public function generate(Readable $file, iterable $ir): Document |
@@ -52,7 +52,7 @@ |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * @param null|Readable|File $schema |
|
| 55 | + * @param null|Readable $schema |
|
| 56 | 56 | * @return mixed|array|object |
| 57 | 57 | */ |
| 58 | 58 | private function loadJsonSchema(?Readable $schema) |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | /** |
| 25 | 25 | * @var string |
| 26 | 26 | */ |
| 27 | - public const RAILT_SDL_1_2 = __DIR__ . '/../../resources/rlsdl-1.2.json'; |
|
| 27 | + public const RAILT_SDL_1_2 = __DIR__.'/../../resources/rlsdl-1.2.json'; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * @var string |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | $this->validator->reset(); |
| 75 | 75 | $this->validator->validate($json, $this->schema, Constraint::CHECK_MODE_VALIDATE_SCHEMA); |
| 76 | 76 | |
| 77 | - if (! $this->validator->isValid()) { |
|
| 77 | + if (!$this->validator->isValid()) { |
|
| 78 | 78 | $error = \implode(\PHP_EOL, [ |
| 79 | 79 | 'An internal representation code errors was found: ', |
| 80 | 80 | $this->errorsToString($this->validator->getErrors()), |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | */ |
| 93 | 93 | private function errorsToString(array $errors): string |
| 94 | 94 | { |
| 95 | - $applicator = function (array $error): string { |
|
| 95 | + $applicator = function(array $error): string { |
|
| 96 | 96 | if ($error['property']) { |
| 97 | 97 | return \sprintf(' - [%s] %s.', $error['property'], $error['message']); |
| 98 | 98 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | trait DirectivesProvider |
| 18 | 18 | { |
| 19 | 19 | /** |
| 20 | - * @return iterable|DirectiveValueNode[] |
|
| 20 | + * @return \Generator |
|
| 21 | 21 | */ |
| 22 | 22 | public function getDirectiveNodes(): iterable |
| 23 | 23 | { |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | use DependentNameProvider; |
| 24 | 24 | |
| 25 | 25 | /** |
| 26 | - * @return \Generator|mixed |
|
| 26 | + * @return \Generator |
|
| 27 | 27 | */ |
| 28 | 28 | protected function parse() |
| 29 | 29 | { |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | /** |
| 25 | 25 | * @param Readable $file |
| 26 | 26 | * @param RuleInterface|ArgumentDefinitionNode $ast |
| 27 | - * @return \Generator|mixed |
|
| 27 | + * @return \Generator |
|
| 28 | 28 | */ |
| 29 | 29 | public function build(Readable $file, RuleInterface $ast) |
| 30 | 30 | { |