BetterReflection\Reflection\ReflectionFunctionAbstract::populateFunctionAbstract PHP Method

populateFunctionAbstract() protected method

Populate the common elements of the function abstract.
protected populateFunctionAbstract ( BetterReflection\Reflector\Reflector $reflector, PhpParser\Node $node, BetterReflection\SourceLocator\Located\LocatedSource $locatedSource, Namespace_ $declaringNamespace = null )
$reflector BetterReflection\Reflector\Reflector
$node PhpParser\Node
$locatedSource BetterReflection\SourceLocator\Located\LocatedSource
$declaringNamespace PhpParser\Node\Stmt\Namespace_
    protected function populateFunctionAbstract(Reflector $reflector, Node $node, LocatedSource $locatedSource, NamespaceNode $declaringNamespace = null)
    {
        if (!$node instanceof Node\Stmt\ClassMethod && !$node instanceof Node\FunctionLike) {
            throw Exception\InvalidAbstractFunctionNodeType::fromNode($node);
        }
        $this->reflector = $reflector;
        $this->node = $node;
        $this->locatedSource = $locatedSource;
        $this->declaringNamespace = $declaringNamespace;
        $this->setNodeOptionalFlag();
    }