Skip to content

Commit 80caa96

Browse files
committed
fix annotations
1 parent fdfe6c8 commit 80caa96

File tree

4 files changed

+9
-17
lines changed

4 files changed

+9
-17
lines changed

src/Executor/ReferenceExecutor.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
use function array_values;
4747
use function get_class;
4848
use function is_array;
49-
use function is_object;
49+
use function is_callable;
5050
use function is_string;
5151
use function sprintf;
5252

@@ -1270,10 +1270,6 @@ private function ensureValidRuntimeType(
12701270
ResolveInfo $info,
12711271
&$result
12721272
) {
1273-
if (is_callable($runtimeTypeOrName)) {
1274-
xdebug_break();
1275-
}
1276-
12771273
$runtimeType = is_string($runtimeTypeOrName)
12781274
? $this->exeContext->schema->getType($runtimeTypeOrName)
12791275
: $runtimeTypeOrName;

src/Type/Definition/FieldDefinition.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class FieldDefinition
5858
*/
5959
public $config;
6060

61-
/** @var OutputType */
61+
/** @var callable|EnumType|InterfaceType|ListOfType|NonNull|ObjectType|ScalarType|UnionType */
6262
public $type;
6363

6464
/** @var callable|string */
@@ -175,7 +175,7 @@ public function getArg($name)
175175
}
176176

177177
/**
178-
* @return Type
178+
* @return EnumType|InterfaceType|ListOfType|NonNull|ObjectType|ScalarType|UnionType
179179
*/
180180
public function getType()
181181
{

src/Type/Definition/Type.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -329,16 +329,12 @@ public static function assertType($type)
329329
/**
330330
* @param callable|Type $type
331331
*/
332-
public static function resolveLazyType($type) : Type
332+
public static function resolveLazyType($type)
333333
{
334334
if (is_callable($type)) {
335335
return $type();
336336
}
337337

338-
if(!$type instanceof Type) {
339-
xdebug_break();
340-
}
341-
static::assertType($type);
342338
return $type;
343339
}
344340

tests/Type/LazyTypeLoaderTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,19 @@ class LazyTypeLoaderTest extends TestCase
2424
/** @var ObjectType */
2525
private $mutation;
2626

27-
/** @var InterfaceType */
27+
/** @var callable */
2828
private $node;
2929

30-
/** @var InterfaceType */
30+
/** @var callable */
3131
private $content;
3232

33-
/** @var ObjectType */
33+
/** @var callable */
3434
private $blogStory;
3535

36-
/** @var ObjectType */
36+
/** @var callable */
3737
private $postStoryMutation;
3838

39-
/** @var InputObjectType */
39+
/** @var callable */
4040
private $postStoryMutationInput;
4141

4242
/** @var callable */

0 commit comments

Comments
 (0)