getVariableTypes() 공개 메소드

public getVariableTypes ( ) : array
리턴 array
예제 #1
0
파일: Scope.php 프로젝트: phpstan/phpstan
 public function addVariables(Scope $otherScope) : self
 {
     $variableTypes = $this->getVariableTypes();
     foreach ($otherScope->getVariableTypes() as $name => $variableType) {
         if ($this->hasVariableType($name)) {
             $variableType = $this->getVariableType($name)->combineWith($variableType);
         }
         $variableTypes[$name] = $variableType;
     }
     return new self($this->broker, $this->printer, $this->getFile(), $this->getAnalysedContextFile(), $this->isDeclareStrictTypes(), $this->getClass(), $this->getFunction(), $this->getNamespace(), $variableTypes, $this->inClosureBindScopeClass, $this->getAnonymousFunctionReturnType(), $this->isInAnonymousClass() ? $this->getAnonymousClass() : null, $this->getInFunctionCall(), $this->isNegated(), $this->moreSpecificTypes);
 }