@@ -86,7 +86,6 @@ public function testGetResourceObjectType(): void
86
86
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
87
87
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
88
88
89
- /** @var Operation $operation */
90
89
$ operation = (new Query ())->withShortName ('shortName ' )->withDescription ('description ' )->withClass ('resourceClass ' );
91
90
/** @var ObjectType $resourceObjectType */
92
91
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadataCollection , $ operation , null , ['input ' => false ]);
@@ -112,7 +111,6 @@ public function testGetResourceObjectTypeOutputClass(): void
112
111
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
113
112
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
114
113
115
- /** @var Operation $operation */
116
114
$ operation = (new Query ())->withShortName ('shortName ' )->withDescription ('description ' )->withOutput (['class ' => 'outputClass ' ]);
117
115
/** @var ObjectType $resourceObjectType */
118
116
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadataCollection , $ operation , null , ['input ' => false ]);
@@ -177,7 +175,6 @@ public function testGetResourceObjectTypeInput(): void
177
175
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
178
176
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
179
177
180
- /** @var Operation $operation */
181
178
$ operation = (new Mutation ())->withName ('custom ' )->withShortName ('shortName ' )->withDescription ('description ' )->withClass ('resourceClass ' );
182
179
/** @var NonNull $resourceObjectType */
183
180
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadata , $ operation , null , ['input ' => true ]);
@@ -202,7 +199,6 @@ public function testGetResourceObjectTypeNestedInput(): void
202
199
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
203
200
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
204
201
205
- /** @var Operation $operation */
206
202
$ operation = (new Mutation ())->withName ('custom ' )->withShortName ('shortName ' )->withDescription ('description ' )->withClass ('resourceClass ' );
207
203
/** @var NonNull $resourceObjectType */
208
204
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadata , $ operation , null , ['input ' => true , 'wrapped ' => false , 'depth ' => 1 ]);
@@ -227,9 +223,7 @@ public function testGetResourceObjectTypeNestedInputNullable(): void
227
223
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
228
224
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
229
225
230
- /** @var Operation $operation */
231
226
$ operation = (new Mutation ())->withName ('custom ' )->withShortName ('shortNameNullable ' )->withDescription ('description nullable ' )->withClass ('resourceClass ' );
232
- /** @var ApiProperty $propertyMetadata */
233
227
$ propertyMetadata = (new ApiProperty ())->withRequired (false );
234
228
/** @var InputObjectType $resourceObjectType */
235
229
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadata , $ operation , $ propertyMetadata , [
@@ -257,7 +251,6 @@ public function testGetResourceObjectTypeCustomMutationInputArgs(): void
257
251
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
258
252
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
259
253
260
- /** @var Operation $operation */
261
254
$ operation = (new Mutation ())->withArgs ([])->withName ('custom ' )->withShortName ('shortName ' )->withDescription ('description ' )->withClass ('resourceClass ' );
262
255
/** @var NonNull $resourceObjectType */
263
256
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadata , $ operation , null , ['input ' => true ]);
@@ -288,7 +281,6 @@ public function testGetResourceObjectTypeMutation(): void
288
281
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
289
282
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
290
283
291
- /** @var Operation $operation */
292
284
$ operation = (new Mutation ())->withName ('create ' )->withShortName ('shortName ' )->withDescription ('description ' )->withClass ('resourceClass ' );
293
285
/** @var ObjectType $resourceObjectType */
294
286
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadata , $ operation , null , ['input ' => false ]);
@@ -320,7 +312,6 @@ public function testGetResourceObjectTypeMutationWrappedType(): void
320
312
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
321
313
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
322
314
323
- /** @var Operation $operation */
324
315
$ operation = (new Mutation ())->withName ('create ' )->withShortName ('shortName ' )->withDescription ('description ' )->withNormalizationContext (['groups ' => ['create ' ]])->withClass ('resourceClass ' );
325
316
/** @var ObjectType $resourceObjectType */
326
317
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadata , $ operation , null , ['input ' => false ]);
@@ -362,7 +353,6 @@ public function testGetResourceObjectTypeMutationNested(): void
362
353
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
363
354
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
364
355
365
- /** @var Operation $operation */
366
356
$ operation = (new Mutation ())->withName ('create ' )->withShortName ('shortName ' )->withDescription ('description ' )->withClass ('resourceClass ' );
367
357
/** @var ObjectType $resourceObjectType */
368
358
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadata , $ operation , null , ['input ' => false , 'wrapped ' => false , 'depth ' => 1 ]);
@@ -390,7 +380,6 @@ public function testGetResourceObjectTypeSubscription(): void
390
380
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
391
381
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
392
382
393
- /** @var Operation $operation */
394
383
$ operation = (new Subscription ())->withName ('update ' )->withShortName ('shortName ' )->withDescription ('description ' )->withMercure (true )->withClass ('resourceClass ' );
395
384
/** @var ObjectType $resourceObjectType */
396
385
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadata , $ operation , null , ['input ' => false ]);
@@ -424,7 +413,6 @@ public function testGetResourceObjectTypeSubscriptionWrappedType(): void
424
413
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
425
414
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
426
415
427
- /** @var Operation $operation */
428
416
$ operation = (new Subscription ())->withName ('update ' )->withShortName ('shortName ' )->withDescription ('description ' )->withNormalizationContext (['groups ' => ['update ' ]])->withClass ('resourceClass ' );
429
417
/** @var ObjectType $resourceObjectType */
430
418
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadata , $ operation , null , ['input ' => false ]);
@@ -467,7 +455,6 @@ public function testGetResourceObjectTypeSubscriptionNested(): void
467
455
$ this ->typesContainerProphecy ->has ('Node ' )->shouldBeCalled ()->willReturn (false );
468
456
$ this ->typesContainerProphecy ->set ('Node ' , Argument::type (InterfaceType::class))->shouldBeCalled ();
469
457
470
- /** @var Operation $operation */
471
458
$ operation = (new Subscription ())->withName ('update ' )->withShortName ('shortName ' )->withDescription ('description ' )->withMercure (true )->withClass ('resourceClass ' );
472
459
/** @var ObjectType $resourceObjectType */
473
460
$ resourceObjectType = $ this ->typeBuilder ->getResourceObjectType ($ resourceMetadata , $ operation , null , ['input ' => false , 'wrapped ' => false , 'depth ' => 1 ]);
@@ -496,18 +483,17 @@ public function testGetNodeInterface(): void
496
483
$ this ->assertNull ($ nodeInterface ->resolveType ([], [], $ this ->prophesize (ResolveInfo::class)->reveal ()));
497
484
498
485
$ this ->typesContainerProphecy ->has ('Dummy ' )->shouldBeCalled ()->willReturn (false );
499
- $ this ->assertNull ($ nodeInterface ->resolveType ([ItemNormalizer::ITEM_RESOURCE_CLASS_KEY => Dummy::class], [], $ this ->prophesize (ResolveInfo::class)->reveal ()));
486
+ $ resolvedType = $ nodeInterface ->resolveType ([ItemNormalizer::ITEM_RESOURCE_CLASS_KEY => Dummy::class], [], $ this ->prophesize (ResolveInfo::class)->reveal ());
487
+ $ this ->assertNull ($ resolvedType );
500
488
501
489
$ this ->typesContainerProphecy ->has ('Dummy ' )->shouldBeCalled ()->willReturn (true );
502
490
$ this ->typesContainerProphecy ->get ('Dummy ' )->shouldBeCalled ()->willReturn (GraphQLType::string ());
503
- /** @var GraphQLType $resolvedType */
504
491
$ resolvedType = $ nodeInterface ->resolveType ([ItemNormalizer::ITEM_RESOURCE_CLASS_KEY => Dummy::class], [], $ this ->prophesize (ResolveInfo::class)->reveal ());
505
492
$ this ->assertSame (GraphQLType::string (), $ resolvedType );
506
493
}
507
494
508
495
public function testCursorBasedGetPaginatedCollectionType (): void
509
496
{
510
- /** @var Operation $operation */
511
497
$ operation = (new Query ())->withPaginationType ('cursor ' );
512
498
$ this ->typesContainerProphecy ->has ('StringCursorConnection ' )->shouldBeCalled ()->willReturn (false );
513
499
$ this ->typesContainerProphecy ->set ('StringCursorConnection ' , Argument::type (ObjectType::class))->shouldBeCalled ();
@@ -563,7 +549,6 @@ public function testCursorBasedGetPaginatedCollectionType(): void
563
549
564
550
public function testPageBasedGetPaginatedCollectionType (): void
565
551
{
566
- /** @var Operation $operation */
567
552
$ operation = (new Query ())->withPaginationType ('page ' );
568
553
$ this ->typesContainerProphecy ->has ('StringPageConnection ' )->shouldBeCalled ()->willReturn (false );
569
554
$ this ->typesContainerProphecy ->set ('StringPageConnection ' , Argument::type (ObjectType::class))->shouldBeCalled ();
@@ -601,7 +586,6 @@ public function testGetEnumType(): void
601
586
$ enumClass = GamePlayMode::class;
602
587
$ enumName = 'GamePlayMode ' ;
603
588
$ enumDescription = 'GamePlayMode description ' ;
604
- /** @var Operation $operation */
605
589
$ operation = (new Operation ())
606
590
->withClass ($ enumClass )
607
591
->withShortName ($ enumName )
0 commit comments