@@ -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 | } |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
53 | - * @return iterable|InterfaceDefinition[] |
|
53 | + * @return \Generator |
|
54 | 54 | */ |
55 | 55 | public function getInterfaces(): iterable |
56 | 56 | { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | |
86 | 86 | /** |
87 | 87 | * @param InterfaceDefinition $definition |
88 | - * @return ProvidesInterfaces |
|
88 | + * @return HasInterfaces |
|
89 | 89 | */ |
90 | 90 | public function withInterface(InterfaceDefinition $definition): ProvidesInterfaces |
91 | 91 | { |
@@ -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 | } |
@@ -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 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | */ |
49 | 49 | public function getDescription(): string |
50 | 50 | { |
51 | - return (string)$this->description; |
|
51 | + return (string) $this->description; |
|
52 | 52 | } |
53 | 53 | |
54 | 54 | /** |
@@ -63,7 +63,7 @@ |
||
63 | 63 | * @param TypeDefinition $definition |
64 | 64 | * @return bool |
65 | 65 | */ |
66 | - public function instanceOf(TypeDefinition $definition): bool |
|
66 | + public function instanceof(TypeDefinition $definition): bool |
|
67 | 67 | { |
68 | 68 | return $this instanceof $definition; |
69 | 69 | } |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * @version SDL June 2018 |
111 | 111 | * @var string |
112 | 112 | */ |
113 | - public const INTERFACE = 'INTERFACE'; |
|
113 | + public const interface = 'INTERFACE'; |
|
114 | 114 | |
115 | 115 | /** |
116 | 116 | * @version SDL June 2018 |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | public const SDL_LOCATIONS = [ |
162 | 162 | self::SCALAR, |
163 | 163 | self::OBJECT, |
164 | - self::INTERFACE, |
|
164 | + self::interface, |
|
165 | 165 | self::UNION, |
166 | 166 | self::ENUM, |
167 | 167 | self::INPUT_OBJECT, |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | public const LOCATION_TO_TYPES = [ |
182 | 182 | self::SCALAR => Type::SCALAR, |
183 | 183 | self::OBJECT => Type::OBJECT, |
184 | - self::INTERFACE => Type::INTERFACE, |
|
184 | + self::interface => Type::interface, |
|
185 | 185 | self::UNION => Type::UNION, |
186 | 186 | self::ENUM => Type::ENUM, |
187 | 187 | self::INPUT_OBJECT => Type::INPUT_OBJECT, |
@@ -22,7 +22,7 @@ |
||
22 | 22 | { |
23 | 23 | $name = \ucwords(\mb_strtolower(\preg_replace('/\W+/u', ' ', $name))); |
24 | 24 | |
25 | - return (string)\str_replace(' ', '', $name); |
|
25 | + return (string) \str_replace(' ', '', $name); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | /** |
69 | 69 | * @param int $value |
70 | - * @return ProvidesTypeIndication |
|
70 | + * @return HasTypeIndication |
|
71 | 71 | */ |
72 | 72 | public function withModifiers(int $value): ProvidesTypeIndication |
73 | 73 | { |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | /** |
80 | 80 | * @param string $name |
81 | - * @return ProvidesTypeIndication |
|
81 | + * @return HasTypeIndication |
|
82 | 82 | */ |
83 | 83 | public function withTypeDefinition(string $name): ProvidesTypeIndication |
84 | 84 | { |
@@ -137,7 +137,7 @@ |
||
137 | 137 | */ |
138 | 138 | public function getDefinition(string $name): ?TypeDefinition |
139 | 139 | { |
140 | - if (! \in_array($name, $this->types, true)) { |
|
140 | + if (!\in_array($name, $this->types, true)) { |
|
141 | 141 | return null; |
142 | 142 | } |
143 | 143 |