We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06806d7 commit 901b335Copy full SHA for 901b335
1 file changed
src/Analyser/MutatingScope.php
@@ -675,7 +675,9 @@ public function hasVariableType(string $variableName): TrinaryLogic
675
/** @api */
676
public function getVariableType(string $variableName): Type
677
{
678
- if ($this->hasVariableType($variableName)->maybe()) {
+ $hasVariableType = $this->hasVariableType($variableName);
679
+
680
+ if ($hasVariableType->maybe()) {
681
if ($variableName === 'argc') {
682
return IntegerRangeType::fromInterval(1, null);
683
}
@@ -691,7 +693,7 @@ public function getVariableType(string $variableName): Type
691
693
692
694
695
- if ($this->hasVariableType($variableName)->no()) {
696
+ if ($hasVariableType->no()) {
697
throw new UndefinedVariableException($this, $variableName);
698
699
0 commit comments