@@ -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. |
@@ -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 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | $interface = new TypeDefinition($ast->getFullName()); |
| 32 | 32 | $interface->in($file, $ast->getOffset()); |
| 33 | 33 | |
| 34 | - $interface->type = Type::of(Type::INTERFACE); |
|
| 34 | + $interface->type = Type::of(Type::interface); |
|
| 35 | 35 | $interface->description = $ast->getDescription(); |
| 36 | 36 | |
| 37 | 37 | $this->loadInterfaces($ast, $interface); |
@@ -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 | |