Skip to content

Commit

Permalink
remove else statement
Browse files Browse the repository at this point in the history
  • Loading branch information
IanDelMar committed Jun 28, 2024
1 parent 1c3d429 commit 2a284d8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WpParseUrlFunctionDynamicReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,

$this->cacheReturnTypes();

$componentType = new ConstantIntegerType(-1);

if (count($functionCall->getArgs()) > 1) {
$componentType = $scope->getType($functionCall->getArgs()[1]->value);

Expand All @@ -78,8 +80,6 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
if (! $componentType instanceof ConstantIntegerType) {
return $this->createAllComponentsReturnType();
}
} else {
$componentType = new ConstantIntegerType(-1);
}

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

0 comments on commit 2a284d8

Please sign in to comment.