Skip to content

Commit 8f3e206

Browse files
phpstan-botclaude
andcommitted
Move $isNonEmpty computation inside the if block where it is used
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent da99385 commit 8f3e206

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Type/Php/ImplodeFunctionReturnTypeExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public function getTypeFromFunctionCall(
6161

6262
private function implode(Type $arrayType, Type $separatorType): Type
6363
{
64-
$isNonEmpty = $arrayType->isIterableAtLeastOnce()->yes();
6564
if (count($arrayType->getConstantArrays()) > 0 && count($separatorType->getConstantStrings()) > 0) {
65+
$isNonEmpty = $arrayType->isIterableAtLeastOnce()->yes();
6666
$result = [];
6767
foreach ($separatorType->getConstantStrings() as $separator) {
6868
foreach ($arrayType->getConstantArrays() as $constantArray) {

0 commit comments

Comments
 (0)