Skip to content

Commit 66b674d

Browse files
Simplified
1 parent f4927db commit 66b674d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Type/Php/SprintfFunctionDynamicReturnTypeExtension.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,17 +126,15 @@ public function getTypeFromFunctionCall(
126126
$constArgTypes = $checkArgType->getConstantScalarTypes();
127127
}
128128
if ($constArgTypes !== []) {
129-
$result = [];
130129
$printfArgs = array_fill(0, count($args) - 1, '');
131130
foreach ($constArgTypes as $constArgType) {
132131
$printfArgs[$checkArg - 1] = $constArgType->getValue();
133132
try {
134-
$result[] = new ConstantStringType(@sprintf($constantString->getValue(), ...$printfArgs));
133+
$singlePlaceholderEarlyReturn[] = new ConstantStringType(@sprintf($constantString->getValue(), ...$printfArgs));
135134
} catch (Throwable) {
136135
continue 2;
137136
}
138137
}
139-
$singlePlaceholderEarlyReturn[] = TypeCombinator::union(...$result);
140138

141139
continue;
142140
}

0 commit comments

Comments
 (0)