You are here

class PHP_Token_NAMESPACE in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/phpunit/php-token-stream/src/Token.php \PHP_Token_NAMESPACE

Hierarchy

Expanded class hierarchy of PHP_Token_NAMESPACE

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

File

vendor/phpunit/php-token-stream/src/Token.php, line 775

View source
class PHP_Token_NAMESPACE extends PHP_TokenWithScope {

  /**
   * @return string
   */
  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