PHPStan\Reflection\ClassReflection::getNativeReflection PHP Method

getNativeReflection() public method

public getNativeReflection ( ) : ReflectionClass
return ReflectionClass
    public function getNativeReflection() : \ReflectionClass
    {
        return $this->reflection;
    }

Usage Example

コード例 #1
0
 public function isVariadic() : bool
 {
     $isNativelyVariadic = $this->reflection->isVariadic();
     if (!$isNativelyVariadic && $this->declaringClass->getName() === 'ReflectionMethod' && $this->reflection->getName() === 'invoke') {
         return true;
     }
     if (!$isNativelyVariadic && $this->declaringClass->getNativeReflection()->getFileName() !== false) {
         $key = sprintf('variadic-method-%s-%s-v2', $this->declaringClass->getName(), $this->reflection->getName());
         $cachedResult = $this->cache->load($key);
         if ($cachedResult === null) {
             $nodes = $this->parser->parseFile($this->declaringClass->getNativeReflection()->getFileName());
             $result = $this->callsFuncGetArgs($nodes);
             $this->cache->save($key, $result);
             return $result;
         }
         return $cachedResult;
     }
     return $isNativelyVariadic;
 }
All Usage Examples Of PHPStan\Reflection\ClassReflection::getNativeReflection