Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit af45c92

Browse files
committed
iterable (PHP 7.1 internal union type) should be recognized as "special" in parameter generation code
1 parent 93b6da0 commit af45c92

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/Generator/ParameterGeneratorTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use ZendTest\Code\TestAsset\DocBlockOnlyHintsClass;
1717
use ZendTest\Code\TestAsset\EmptyClass;
1818
use ZendTest\Code\TestAsset\InternalHintsClass;
19+
use ZendTest\Code\TestAsset\IterableHintsClass;
1920
use ZendTest\Code\TestAsset\NullableHintsClass;
2021
use ZendTest\Code\TestAsset\NullNullableDefaultHintsClass;
2122
use ZendTest\Code\TestAsset\VariadicParametersClass;
@@ -450,6 +451,9 @@ public function reflectionHintsProvider()
450451
[DocBlockOnlyHintsClass::class, 'selfParameter', 'foo', null],
451452
[DocBlockOnlyHintsClass::class, 'classParameter', 'foo', null],
452453
[DocBlockOnlyHintsClass::class, 'otherClassParameter', 'foo', null],
454+
[IterableHintsClass::class, 'iterableParameter', 'foo', 'iterable'],
455+
[IterableHintsClass::class, 'nullableIterableParameter', 'foo', '?iterable'],
456+
[IterableHintsClass::class, 'nullDefaultIterableParameter', 'foo', '?iterable'],
453457
];
454458

455459
$compatibleParameters = array_filter(

0 commit comments

Comments
 (0)