/** * Checks that the current token could be used as file comment. * * This method checks that the previous token is an open tag and the following * token is not a class, a interface, final, abstract or a function. * * @return boolean */ protected function isFileComment() { if ($this->_tokenizer->prev() !== self::T_OPEN_TAG) { return false; } $notExpectedTags = array(self::T_CLASS, self::T_FINAL, self::T_ABSTRACT, self::T_FUNCTION, self::T_INTERFACE); return !in_array($this->_tokenizer->peek(), $notExpectedTags, true); }