class PHP_Token_NAMESPACE

Hierarchy

Expanded class hierarchy of PHP_Token_NAMESPACE

1 string reference to 'PHP_Token_NAMESPACE'
PHP_CodeCoverage_Util::getLinesToBeIgnored in drupal/core/vendor/phpunit/php-code-coverage/PHP/CodeCoverage/Util.php
Returns the lines of a source file that should be ignored.

File

drupal/core/vendor/phpunit/php-token-stream/PHP/Token.php, line 666

View source
class PHP_Token_NAMESPACE extends PHP_TokenWithScope {
  public function getName() {
    $tokens = $this->tokenStream
      ->tokens();
    $namespace = (string) $tokens[$this->id + 2];
    for ($i = $this->id + 3;; $i += 2) {
      if (isset($tokens[$i]) && $tokens[$i] instanceof PHP_Token_NS_SEPARATOR) {
        $namespace .= '\\' . $tokens[$i + 1];
      }
      else {
        break;
      }
    }
    return $namespace;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PHP_Token::$id protected property
PHP_Token::$line protected property
PHP_Token::$text protected property
PHP_Token::$tokenStream protected property
PHP_Token::getLine public function
PHP_Token::__construct public function Constructor.
PHP_Token::__toString public function
PHP_TokenWithScope::$endTokenId protected property
PHP_TokenWithScope::getDocblock public function Get the docblock for this token
PHP_TokenWithScope::getEndLine public function
PHP_TokenWithScope::getEndTokenId public function
PHP_Token_NAMESPACE::getName public function