We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 90cf56c commit 4e3883bCopy full SHA for 4e3883b
tests/PHPStan/Printer/PrinterTest.php
@@ -1385,6 +1385,27 @@ public function enterNode(Node $node)
1385
1386
},
1387
];
1388
+
1389
+ yield [
1390
+ '/** @var ArrayObject<int[]> */',
1391
+ '/** @var ArrayObject<array<int>> */',
1392
+ new class extends AbstractNodeVisitor {
1393
1394
+ public function enterNode(Node $node)
1395
+ {
1396
+ if ($node instanceof ArrayTypeNode) {
1397
+ return new GenericTypeNode(new IdentifierTypeNode('array'), [
1398
+ new IdentifierTypeNode('int'),
1399
+ ], [
1400
+ GenericTypeNode::VARIANCE_INVARIANT,
1401
+ ]);
1402
+ }
1403
1404
+ return $node;
1405
1406
1407
+ },
1408
+ ];
1409
}
1410
1411
/**
0 commit comments