Skip to content

Commit 7fcfbec

Browse files
Fix
1 parent b911d18 commit 7fcfbec

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Type/Php/DateIntervalFormatDynamicReturnTypeExtension.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method
4848
return new IntersectionType([new StringType(), new AccessoryNonEmptyStringType()]);
4949
}
5050

51-
5251
return null;
5352
}
5453

@@ -61,9 +60,10 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method
6160
$possibleReturnTypes[] = new ConstantStringType($value);
6261
}
6362

64-
$result = TypeCombinator::union(...$possibleReturnTypes)->generalize(GeneralizePrecision::moreSpecific());
65-
66-
return TypeCombinator::remove($result, new AccessoryLiteralStringType());
63+
return TypeCombinator::remove(
64+
TypeCombinator::union(...$possibleReturnTypes)->generalize(GeneralizePrecision::moreSpecific()),
65+
new AccessoryLiteralStringType(),
66+
);
6767
}
6868

6969
}

0 commit comments

Comments
 (0)