File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -675,7 +675,9 @@ public function hasVariableType(string $variableName): TrinaryLogic
675675 /** @api */
676676 public function getVariableType (string $ variableName ): Type
677677 {
678- if ($ this ->hasVariableType ($ variableName )->maybe ()) {
678+ $ hasVariableType = $ this ->hasVariableType ($ variableName );
679+
680+ if ($ hasVariableType ->maybe ()) {
679681 if ($ variableName === 'argc ' ) {
680682 return IntegerRangeType::fromInterval (1 , null );
681683 }
@@ -691,7 +693,7 @@ public function getVariableType(string $variableName): Type
691693 }
692694 }
693695
694- if ($ this -> hasVariableType ( $ variableName ) ->no ()) {
696+ if ($ hasVariableType ->no ()) {
695697 throw new UndefinedVariableException ($ this , $ variableName );
696698 }
697699
You can’t perform that action at this time.
0 commit comments