Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. TraitUseAdaptation.php

function TraitUseAdaptation::getNode

Returns the built node.

Return value

Node The built node

Overrides Builder::getNode

File

vendor/nikic/php-parser/lib/PhpParser/Builder/TraitUseAdaptation.php, line 135

Class

TraitUseAdaptation

Namespace

PhpParser\Builder

Code

public function getNode() : Node {
    switch ($this->type) {
        case self::TYPE_ALIAS:
            return new Stmt\TraitUseAdaptation\Alias($this->trait, $this->method, $this->modifier, $this->alias);
        case self::TYPE_PRECEDENCE:
            return new Stmt\TraitUseAdaptation\Precedence($this->trait, $this->method, $this->insteadof);
        default:
            throw new \LogicException('Type of adaptation is not defined');
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal