@@ -107,7 +107,7 @@ |
||
107 | 107 | } |
108 | 108 | |
109 | 109 | /** |
110 | - * @return iterable|TypeDefinition[] |
|
110 | + * @return \Generator |
|
111 | 111 | * @throws TypeNotFoundException |
112 | 112 | */ |
113 | 113 | public function getTypeDefinitions(): iterable |
@@ -132,7 +132,7 @@ |
||
132 | 132 | */ |
133 | 133 | public function getTypeDefinition(string $name): ?TypeDefinition |
134 | 134 | { |
135 | - if (! \in_array($name, $this->types, true)) { |
|
135 | + if (!\in_array($name, $this->types, true)) { |
|
136 | 136 | return null; |
137 | 137 | } |
138 | 138 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | |
53 | 53 | /** |
54 | 54 | * @param Type|null $of |
55 | - * @return iterable|TypeDefinition[] |
|
55 | + * @return \Generator |
|
56 | 56 | */ |
57 | 57 | public function all(Type $of = null): iterable |
58 | 58 | { |
@@ -14,7 +14,6 @@ |
||
14 | 14 | use Railt\Reflection\Contracts\Document as DocumentInterface; |
15 | 15 | use Railt\Reflection\Contracts\Reflection as ReflectionInterface; |
16 | 16 | use Railt\Reflection\Contracts\Type; |
17 | -use Railt\Reflection\Exception\TypeConflictException; |
|
18 | 17 | use Railt\Reflection\Exception\TypeNotFoundException; |
19 | 18 | |
20 | 19 | /** |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * @var string |
29 | 29 | */ |
30 | - public const INTERFACE = 'Interface'; |
|
30 | + public const interface = 'Interface'; |
|
31 | 31 | |
32 | 32 | /** |
33 | 33 | * @var string |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | public const ROOT_TYPES = [ |
103 | 103 | self::SCALAR, |
104 | 104 | self::OBJECT, |
105 | - self::INTERFACE, |
|
105 | + self::interface, |
|
106 | 106 | self::UNION, |
107 | 107 | self::ENUM, |
108 | 108 | self::INPUT_OBJECT, |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public const INHERITANCE_TREE = [ |
117 | 117 | self::ANY => [ |
118 | - self::INTERFACE => [ |
|
118 | + self::interface => [ |
|
119 | 119 | self::OBJECT => [ |
120 | 120 | self::INPUT_OBJECT, |
121 | 121 | ], |
@@ -143,7 +143,7 @@ discard block |
||
143 | 143 | * @param Type $type |
144 | 144 | * @return bool |
145 | 145 | */ |
146 | - public function instanceOf(Type $type): bool; |
|
146 | + public function instanceof(Type $type): bool; |
|
147 | 147 | |
148 | 148 | /** |
149 | 149 | * @return string |
@@ -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 | /** |