@@ -405,6 +405,76 @@ public function dataGetReferencedTypeArguments(): array
405
405
),
406
406
],
407
407
],
408
+ 'param: In<T> ' => [
409
+ TemplateTypeVariance::createContravariant (),
410
+ new GenericObjectType (D \In::class, [
411
+ $ templateType ('T ' ),
412
+ ]),
413
+ [
414
+ new TemplateTypeReference (
415
+ $ templateType ('T ' ),
416
+ TemplateTypeVariance::createCovariant (),
417
+ ),
418
+ ],
419
+ ],
420
+ 'param: In<In<T>> ' => [
421
+ TemplateTypeVariance::createContravariant (),
422
+ new GenericObjectType (D \In::class, [
423
+ new GenericObjectType (D \In::class, [
424
+ $ templateType ('T ' ),
425
+ ]),
426
+ ]),
427
+ [
428
+ new TemplateTypeReference (
429
+ $ templateType ('T ' ),
430
+ TemplateTypeVariance::createContravariant (),
431
+ ),
432
+ ],
433
+ ],
434
+ 'param: In<In<In<T>>> ' => [
435
+ TemplateTypeVariance::createContravariant (),
436
+ new GenericObjectType (D \In::class, [
437
+ new GenericObjectType (D \In::class, [
438
+ new GenericObjectType (D \In::class, [
439
+ $ templateType ('T ' ),
440
+ ]),
441
+ ]),
442
+ ]),
443
+ [
444
+ new TemplateTypeReference (
445
+ $ templateType ('T ' ),
446
+ TemplateTypeVariance::createCovariant (),
447
+ ),
448
+ ],
449
+ ],
450
+ 'param: In<Out<T>> ' => [
451
+ TemplateTypeVariance::createContravariant (),
452
+ new GenericObjectType (D \In::class, [
453
+ new GenericObjectType (D \Out::class, [
454
+ $ templateType ('T ' ),
455
+ ]),
456
+ ]),
457
+ [
458
+ new TemplateTypeReference (
459
+ $ templateType ('T ' ),
460
+ TemplateTypeVariance::createCovariant (),
461
+ ),
462
+ ],
463
+ ],
464
+ 'param: Out<In<T>> ' => [
465
+ TemplateTypeVariance::createContravariant (),
466
+ new GenericObjectType (D \Out::class, [
467
+ new GenericObjectType (D \In::class, [
468
+ $ templateType ('T ' ),
469
+ ]),
470
+ ]),
471
+ [
472
+ new TemplateTypeReference (
473
+ $ templateType ('T ' ),
474
+ TemplateTypeVariance::createCovariant (),
475
+ ),
476
+ ],
477
+ ],
408
478
'return: Invariant<T> ' => [
409
479
TemplateTypeVariance::createCovariant (),
410
480
new GenericObjectType (D \Invariant::class, [
@@ -473,6 +543,76 @@ public function dataGetReferencedTypeArguments(): array
473
543
),
474
544
],
475
545
],
546
+ 'return: In<T> ' => [
547
+ TemplateTypeVariance::createCovariant (),
548
+ new GenericObjectType (D \In::class, [
549
+ $ templateType ('T ' ),
550
+ ]),
551
+ [
552
+ new TemplateTypeReference (
553
+ $ templateType ('T ' ),
554
+ TemplateTypeVariance::createContravariant (),
555
+ ),
556
+ ],
557
+ ],
558
+ 'return: In<In<T>> ' => [
559
+ TemplateTypeVariance::createCovariant (),
560
+ new GenericObjectType (D \In::class, [
561
+ new GenericObjectType (D \In::class, [
562
+ $ templateType ('T ' ),
563
+ ]),
564
+ ]),
565
+ [
566
+ new TemplateTypeReference (
567
+ $ templateType ('T ' ),
568
+ TemplateTypeVariance::createCovariant (),
569
+ ),
570
+ ],
571
+ ],
572
+ 'return: In<In<In<T>>> ' => [
573
+ TemplateTypeVariance::createCovariant (),
574
+ new GenericObjectType (D \In::class, [
575
+ new GenericObjectType (D \In::class, [
576
+ new GenericObjectType (D \In::class, [
577
+ $ templateType ('T ' ),
578
+ ]),
579
+ ]),
580
+ ]),
581
+ [
582
+ new TemplateTypeReference (
583
+ $ templateType ('T ' ),
584
+ TemplateTypeVariance::createContravariant (),
585
+ ),
586
+ ],
587
+ ],
588
+ 'return: In<Out<T>> ' => [
589
+ TemplateTypeVariance::createCovariant (),
590
+ new GenericObjectType (D \In::class, [
591
+ new GenericObjectType (D \Out::class, [
592
+ $ templateType ('T ' ),
593
+ ]),
594
+ ]),
595
+ [
596
+ new TemplateTypeReference (
597
+ $ templateType ('T ' ),
598
+ TemplateTypeVariance::createContravariant (),
599
+ ),
600
+ ],
601
+ ],
602
+ 'return: Out<In<T>> ' => [
603
+ TemplateTypeVariance::createCovariant (),
604
+ new GenericObjectType (D \Out::class, [
605
+ new GenericObjectType (D \In::class, [
606
+ $ templateType ('T ' ),
607
+ ]),
608
+ ]),
609
+ [
610
+ new TemplateTypeReference (
611
+ $ templateType ('T ' ),
612
+ TemplateTypeVariance::createContravariant (),
613
+ ),
614
+ ],
615
+ ],
476
616
];
477
617
}
478
618
0 commit comments