protected function parseClassSignature() { $this->parseClassModifiers(); $this->consumeToken(Tokens::T_CLASS); $this->consumeComments(); $qualifiedName = $this->createQualifiedTypeName($this->parseClassName()); $class = $this->builder->buildClass($qualifiedName); $class->setCompilationUnit($this->compilationUnit); $class->setModifiers($this->modifiers); $class->setComment($this->docComment); $class->setId($this->idBuilder->forClassOrInterface($class)); $class->setUserDefined(); $this->consumeComments(); $tokenType = $this->tokenizer->peek(); if ($tokenType === Tokens::T_EXTENDS) { $class = $this->parseClassExtends($class); $this->consumeComments(); $tokenType = $this->tokenizer->peek(); } if ($tokenType === Tokens::T_IMPLEMENTS) { $this->consumeToken(Tokens::T_IMPLEMENTS); $this->parseInterfaceList($class); } return $class; }