Skip to content

Commit 2a284d8

Browse files
committed
remove else statement
1 parent 1c3d429 commit 2a284d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/WpParseUrlFunctionDynamicReturnTypeExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
6666

6767
$this->cacheReturnTypes();
6868

69+
$componentType = new ConstantIntegerType(-1);
70+
6971
if (count($functionCall->getArgs()) > 1) {
7072
$componentType = $scope->getType($functionCall->getArgs()[1]->value);
7173

@@ -78,8 +80,6 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
7880
if (! $componentType instanceof ConstantIntegerType) {
7981
return $this->createAllComponentsReturnType();
8082
}
81-
} else {
82-
$componentType = new ConstantIntegerType(-1);
8383
}
8484

8585
$urlType = $scope->getType($functionCall->getArgs()[0]->value);

0 commit comments

Comments
 (0)