@param \PHPMD\Node\AbstractNode $node

@return void
766056
protected function addViolationMessage(AbstractNode $node): void
    {
        $message = sprintf(
            'The DependencyProvider method %s() violates rule "%s"',
            $node->getName(),
            static::RULE
        );

        $this->addViolation($node, [$message]);
    }
460986
public function copyNode(NodeInterface $node)
    {
        $this->nodeContextPath = $node->getContextPath();
        $this->mode = self::MODE_COPY;
    }
162065
public function addNode(AbstractNode $node) {
        $node->parent           = $this;
        $this->index[$node->id] = count($this->nodes);
        $this->nodes[]          = $node;
        return $this;
    }
390949
public function attachLeft(BinaryNode $node) : void
    {
        $node->setParent($this);

        $this->left = $node;
    }
1169609
public function apply(AbstractNode $node)
    {
        if (!$this->isFactory($node)) {
            return;
        }

        foreach ($node->getMethods() as $method) {
            $this->applyRule($method);
        }
    }
603965
public function addChildAsLast(Node $node)
    {
        if(null === $this->children)
        {
            $this->children = array();
        }

        $this->children[] = $node;
    }
131429
public function apply(AbstractNode $node): void
    {
        if (!$this->isDependencyProvider($node, 'Zed')) {
            return;
        }

        if (!$this->hasPropelQueryAllocationExpression($node)) {
            return;
        }

        $this->applyPropelQueryConstNameRule($node);
    }
227821
protected function isFacade(AbstractNode $node)
    {
        if ($node instanceof MethodNode) {
            $parent = $node->getNode()->getParent();
            $className = $parent->getNamespaceName() . '\\' . $parent->getName();
        } else {
            $className = $node->getFullQualifiedName();
        }

        if (preg_match('/\\\\Zed\\\\\w+\\\\Business\\\\\w+Facade$/', $className)) {
            return true;
        }

        return false;
    }
100090
public function apply(AbstractNode $node)
    {
        if (empty($this->classRegex) || preg_match($this->classRegex, $node->getFullQualifiedName()) === 0) {
            return;
        }

        $nodeNamespace = $node->getNamespaceName();
        foreach ($this->nonApiLayers as $nonApiLayer) {
            $nonApiLayerNamespace = 'Dependency\\' . $nonApiLayer;
            if ($this->stringEndsWith($nodeNamespace, $nonApiLayerNamespace)) {
                return;
            }
        }

        /** @var \PHPMD\Node\InterfaceNode $node */
        foreach ($node->getMethods() as $method) {
            $this->applyEveryInterfaceMethodMustHaveApiTagAndContractText($method);
        }
    }
170298
public function afterNodeCreate(NodeInterface $node)
    {
        if (!$this->eventEmittingService->isEnabled()) {
            return;
        }

        /* @var $nodeEvent NodeEvent */
        $nodeEvent = array_pop($this->currentNodeAddEvents);
        $nodeEvent->setNode($node);
        $this->eventEmittingService->popContext();
        $this->eventEmittingService->add($nodeEvent);
    }
3934
public function addChild(TreeNodeInterface $node): void
    {
        $this->children[] = $node;
        $this->isLeaf = false;
    }
1004170
private function deleteNode( $node ) {
		$this->deleteChildren( $node );
		$parent = $node->parentNode;
		$oldnode = $parent->removeChild( $node );
	}
456359
protected function check(MethodNode $method, AbstractNode $node)
    {
        $params = $method->getParameters();
        foreach ($params as $param) {
            $this->checkParameter($param, $node);
        }
    }
793197
public function add(AbstractNode $node)
    {
        $node->setParent($this);

        $this->children[] = $node;

        return $this;
    }
228738
public function apply(AbstractNode $node)
    {
        if (preg_match('#[A-Za-z0-9]+Constants$#', $node->getName()) === 0 ||
            preg_match('#\\\\Shared\\\\#', $node->getNamespaceName()) !== 0) {
            return;
        }

        $message = sprintf(
            'The environment configuration is not lie in "Shared" layer. That violates the rule "%s"',
            static::RULE
        );

        $this->addViolation($node, [$message]);
    }
987832
public function apply(AbstractNode $node)
    {
        if (!$this->isDependencyProvider($node, 'Zed')) {
            return;
        }

        $this->applyRule($node, $this->allowedProvideMethodNames);
    }
1364921
protected function assertIsNodeSupported(Node $node): void
    {
        if (!$this->isNodeSupported($node)) {
            $class = ClassUtils::getShortName(static::class);
            throw new InvalidArgumentException(
                "Node [{$node::schema()->getCurie()}] not supported by [{$class}]."
            );
        }
    }