Skip to content

Commit 6f72e96

Browse files
authored
Fix CS (#5990)
1 parent ee0047a commit 6f72e96

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

‎src/Type/Php/ExplodeFunctionDynamicReturnTypeExtension.php‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,18 @@ public function getTypeFromFunctionCall(
9191

9292
$limitType = isset($args[2]) ? $scope->getType($args[2]->value) : null;
9393

94-
if ($this->isDelimiterGuaranteedPresent($args, $scope) && ($limitType === null || IntegerRangeType::fromInterval(2, null)->isSuperTypeOf($limitType)->yes())) {
94+
if (
95+
$this->isDelimiterGuaranteedPresent($args, $scope)
96+
&& ($limitType === null || IntegerRangeType::fromInterval(2, null)->isSuperTypeOf($limitType)->yes())
97+
) {
9598
$returnType = $this->createGuaranteedSplitType($returnValueType, $limitType);
9699
} else {
97100
$returnType = new IntersectionType([new ArrayType(IntegerRangeType::createAllGreaterThanOrEqualTo(0), $returnValueType), new AccessoryArrayListType()]);
98101

99-
if ($limitType === null || IntegerRangeType::fromInterval(0, null)->isSuperTypeOf($limitType)->yes()) {
102+
if (
103+
$limitType === null
104+
|| IntegerRangeType::fromInterval(0, null)->isSuperTypeOf($limitType)->yes()
105+
) {
100106
$returnType = TypeCombinator::intersect($returnType, new NonEmptyArrayType());
101107
}
102108
}

0 commit comments

Comments
 (0)