PDepend\Source\Tokenizer\Tokenizer::next PHP Méthode

next() public méthode

Returns the next token or {@link \PDepend\Source\Tokenizer\Tokenizer::T_EOF} if there is no next token.
public next ( ) : PDepend\Source\Tokenizer\Token
Résultat PDepend\Source\Tokenizer\Token
    public function next();

Usage Example

 /**
  * Constructs a new missing value exception.
  *
  * @param \PDepend\Source\Tokenizer\Tokenizer $tokenizer
  */
 public function __construct(Tokenizer $tokenizer)
 {
     // Get wrong token
     $token = $tokenizer->next();
     // The parser must take care for this
     assert($token instanceof Token);
     $message = sprintf('Missing default value on line: %d, col: %d, file: %s.', $token->startLine, $token->startColumn, $tokenizer->getSourceFile());
     parent::__construct($message);
 }