@@ -41,7 +41,7 @@ |
||
41 | 41 | } |
42 | 42 | |
43 | 43 | /** |
44 | - * @return iterable|InterfaceDefinition[] |
|
44 | + * @return \Generator |
|
45 | 45 | */ |
46 | 46 | public function getInterfaces(): iterable |
47 | 47 | { |
@@ -66,7 +66,7 @@ |
||
66 | 66 | */ |
67 | 67 | public function getInterface(string $name): InterfaceDefinition |
68 | 68 | { |
69 | - if (! \in_array($name, $this->interfaces, true)) { |
|
69 | + if (!\in_array($name, $this->interfaces, true)) { |
|
70 | 70 | $error = \sprintf('%s does not contain an interface named "%s"', $this, $name); |
71 | 71 | throw new TypeNotFoundException($error); |
72 | 72 | } |
@@ -28,15 +28,15 @@ |
||
28 | 28 | */ |
29 | 29 | public static function getType(): TypeInterface |
30 | 30 | { |
31 | - return Type::of(Type::INTERFACE); |
|
31 | + return Type::of(Type::interface); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
35 | 35 | * @param TypeDefinition $definition |
36 | 36 | * @return bool |
37 | 37 | */ |
38 | - public function instanceOf(TypeDefinition $definition): bool |
|
38 | + public function instanceof(TypeDefinition $definition): bool |
|
39 | 39 | { |
40 | - return $this->instanceOfInterface($definition) || parent::instanceOf($definition); |
|
40 | + return $this->instanceOfInterface($definition) || parent::instanceof($definition); |
|
41 | 41 | } |
42 | 42 | } |
@@ -43,6 +43,6 @@ |
||
43 | 43 | */ |
44 | 44 | public function getDeprecationReason(): string |
45 | 45 | { |
46 | - return (string)$this->deprecation; |
|
46 | + return (string) $this->deprecation; |
|
47 | 47 | } |
48 | 48 | } |
@@ -36,5 +36,5 @@ |
||
36 | 36 | * @param TypeDefinition $definition |
37 | 37 | * @return bool |
38 | 38 | */ |
39 | - public function instanceOf(TypeDefinition $definition): bool; |
|
39 | + public function instanceof(TypeDefinition $definition): bool; |
|
40 | 40 | } |
@@ -41,7 +41,7 @@ |
||
41 | 41 | Type::ENUM_VALUE, |
42 | 42 | Type::UNION, |
43 | 43 | Type::INPUT_UNION, |
44 | - Type::INTERFACE, |
|
44 | + Type::interface, |
|
45 | 45 | Type::SCALAR, |
46 | 46 | Type::FIELD_DEFINITION, |
47 | 47 | Type::ARGUMENT_DEFINITION, |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | /** |
63 | 63 | * Type of interface definition. |
64 | 64 | */ |
65 | - public const INTERFACE = 'INTERFACE'; |
|
65 | + public const interface = 'INTERFACE'; |
|
66 | 66 | |
67 | 67 | /** |
68 | 68 | * Type of enum value definition. |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | * @param Type $type |
135 | 135 | * @return bool |
136 | 136 | */ |
137 | - public function instanceOf(Type $type): bool; |
|
137 | + public function instanceof(Type $type): bool; |
|
138 | 138 | |
139 | 139 | /** |
140 | 140 | * @return string |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $name = \str_replace(['-', '_'], ' ', $name); |
24 | 24 | $name = \ucwords($name); |
25 | 25 | |
26 | - return (string)\str_replace(' ', '', $name); |
|
26 | + return (string) \str_replace(' ', '', $name); |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
@@ -67,7 +67,7 @@ |
||
67 | 67 | * @param TypeInterface $type |
68 | 68 | * @return bool |
69 | 69 | */ |
70 | - public function instanceOf(TypeInterface $type): bool |
|
70 | + public function instanceof(TypeInterface $type): bool |
|
71 | 71 | { |
72 | 72 | return $this instanceof $type; |
73 | 73 | } |
@@ -133,7 +133,7 @@ |
||
133 | 133 | */ |
134 | 134 | public function getTypeDefinition(string $name): TypeDefinition |
135 | 135 | { |
136 | - if (! \in_array($name, $this->types, true)) { |
|
136 | + if (!\in_array($name, $this->types, true)) { |
|
137 | 137 | return null; |
138 | 138 | } |
139 | 139 |