ApiGen\Generator\Resolvers\ElementResolver::correctContextForParameterOrClassMember PHP Méthode

correctContextForParameterOrClassMember() private méthode

private correctContextForParameterOrClassMember ( ApiGen\Contracts\Parser\Reflection\ClassReflectionInterface | ApiGen\Contracts\Parser\Reflection\ParameterReflectionInterface | ApiGen\Contracts\Parser\Reflection\FunctionReflectionInterface $reflectionElement ) : ApiGen\Contracts\Parser\Reflection\ClassReflectionInterface | ApiGen\Contracts\Parser\Reflection\FunctionReflectionInterface
$reflectionElement ApiGen\Contracts\Parser\Reflection\ClassReflectionInterface | ApiGen\Contracts\Parser\Reflection\ParameterReflectionInterface | ApiGen\Contracts\Parser\Reflection\FunctionReflectionInterface
Résultat ApiGen\Contracts\Parser\Reflection\ClassReflectionInterface | ApiGen\Contracts\Parser\Reflection\FunctionReflectionInterface
    private function correctContextForParameterOrClassMember($reflectionElement)
    {
        if ($reflectionElement instanceof ParameterReflectionInterface && $reflectionElement->getDeclaringClassName() === null) {
            // Parameter of function in namespace or global space
            return $this->getFunction($reflectionElement->getDeclaringFunctionName());
        } elseif ($reflectionElement instanceof InClassInterface) {
            // Member of a class
            return $this->getClass($reflectionElement->getDeclaringClassName());
        }
        return $reflectionElement;
    }