/** * Utility function to determine whether or not a T_DOC_COMMENT * is at the file level or belongs to a class, interface, method * or member.<br> * <b>Note:<b> This will miss file doc blocks with no new line * before the next token - in this case we can never be sure * what the doc block is aimed at. * * @return true if the next token is a T_NEW_LINE or T_DOC_COMMENT, * false otherwise. */ private function _isFileDocComment() { $tokenPosition = $this->tokenizer->getCurrentPosition(); $nextToken = $this->tokenizer->peekNextValidToken($tokenPosition, true); return !$this->_inClassStatement && !$this->_inInterfaceStatement && ($nextToken->id == T_NEW_LINE || $nextToken->id == T_DOC_COMMENT); }