You are here

class PHP_Token_CLASS in Zircon Profile 8

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

Hierarchy

Expanded class hierarchy of PHP_Token_CLASS

2 string references to 'PHP_Token_CLASS'
PHP_CodeCoverage::getLinesToBeIgnored in vendor/phpunit/php-code-coverage/src/CodeCoverage.php
Returns the lines of a source file that should be ignored.
PHP_Token_Stream::parse in vendor/phpunit/php-token-stream/src/Token/Stream.php

File

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

View source
class PHP_Token_CLASS extends PHP_Token_INTERFACE {

  /**
   * @return string
   */
  public function getName() {
    $next = $this->tokenStream[$this->id + 1];
    if ($next instanceof PHP_Token_WHITESPACE) {
      $next = $this->tokenStream[$this->id + 2];
    }
    if ($next instanceof PHP_Token_STRING) {
      return (string) $next;
    }
    if ($next instanceof PHP_Token_OPEN_CURLY || $next instanceof PHP_Token_EXTENDS || $next instanceof PHP_Token_IMPLEMENTS) {
      return 'anonymous class';
    }
  }

}

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_TokenWithScopeAndVisibility::getKeywords public function
PHP_TokenWithScopeAndVisibility::getVisibility public function
PHP_Token_CLASS::getName public function Overrides PHP_Token_INTERFACE::getName
PHP_Token_INTERFACE::$interfaces protected property
PHP_Token_INTERFACE::arrayToName protected function
PHP_Token_INTERFACE::getInterfaces public function
PHP_Token_INTERFACE::getPackage public function
PHP_Token_INTERFACE::getParent public function
PHP_Token_INTERFACE::hasInterfaces public function
PHP_Token_INTERFACE::hasParent public function