original_string: public function findNextToken($matcher)
      {
          $nextToken = $this->nextToken;
          while (null !== $nextToken) {
              if ($nextToken->matches($matcher)) {
                  return new Some($nextToken);
              }
  
              $nextToken = $nextToken->nextToken;
          }
  
          return None::create();
      }
code: public function findNextToken($matcher)
      {
          $nextToken = $this->nextToken;
          while (null !== $nextToken) {
              if ($nextToken->matches($matcher)) {
                  return new Some($nextToken);
              }
  
              $nextToken = $nextToken->nextToken;
          }
  
          return None::create();
      }
code_tokens: public function findNextToken ( $ matcher ) { $ nextToken = $ this -> nextToken ; while ( null !== $ nextToken ) { if ( $ nextToken -> matches ( $ matcher ) ) { return new Some ( $ nextToken ) ; } $ nextToken = $ nextToken -> nextToken ; } return None :: create ( ) ; }
docstring: Finds the next token that satisfies the passed matcher.
  
  Eligible matchers are:
  
  - T_??? constants such as T_WHITESPACE
  - Literal values such as ";"
  - A Closure which receives an AbstractToken as first argument
  - Some special built-in matchers: "END_OF_LINE", "END_OF_NAME" (see matches())
  
  @param string|integer|\Closure $matcher
  
  @return Option<AbstractToken>
docstring_tokens: Finds the next token that satisfies the passed matcher .