Skip to content

Commit c249768

Browse files
committed
Fix build
1 parent ab704f4 commit c249768

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Analyser/MutatingScope.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3877,6 +3877,15 @@ public function isParameterValueNullable(Node\Param $parameter): bool
38773877
*/
38783878
public function getFunctionType($type, bool $isNullable, bool $isVariadic): Type
38793879
{
3880+
if ($isVariadic) {
3881+
if (!$this->getPhpVersion()->supportsNamedArguments()->no()) {
3882+
return new ArrayType(new UnionType([new IntegerType(), new StringType()]), $this->getFunctionType(
3883+
$type,
3884+
$isNullable,
3885+
false,
3886+
));
3887+
}
3888+
}
38803889
return $this->initializerExprTypeResolver->getFunctionType($type, $isNullable, $isVariadic, InitializerExprContext::fromScope($this));
38813890
}
38823891

0 commit comments

Comments
 (0)