Skip to content

Commit 4c54a1a

Browse files
committed
resolve linting on lower PHP versions
Incorporates #3613 (comment), #3613 (comment)
1 parent 356e0f8 commit 4c54a1a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ public function getTypeFromFunctionCall(
6666
$accessory[] = new AccessoryUppercaseStringType();
6767
}
6868
if (count($accessory) > 0) {
69-
$returnValueType = new IntersectionType([new StringType(), ...$accessory]);
69+
$accessory[] = new StringType();
70+
$returnValueType = new IntersectionType($accessory);
7071
} else {
7172
$returnValueType = new StringType();
7273
}

src/Type/Php/ParseStrParameterOutTypeExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public function getParameterOutTypeFromFunctionCall(FunctionReflection $function
4545
$accessory[] = new AccessoryUppercaseStringType();
4646
}
4747
if (count($accessory) > 0) {
48-
$valueType = new IntersectionType([new StringType(), ...$accessory]);
48+
$accessory[] = new StringType();
49+
$valueType = new IntersectionType($accessory);
4950
} else {
5051
$valueType = new StringType();
5152
}

0 commit comments

Comments
 (0)