public function PHP_Token_CLASS::getName in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/phpunit/php-token-stream/src/Token.php \PHP_Token_CLASS::getName()
Return value
string
Overrides PHP_Token_INTERFACE::getName
File
- vendor/
phpunit/ php-token-stream/ src/ Token.php, line 620
Class
Code
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';
}
}