phplinter\Lint\BaseLint::find PHP Method

find() protected method

----------------------------------------------------------------------+ Find the next token.
protected find ( $pos, $token, $limit = 10 ) : Int
return Int ----------------------------------------------------------------------+
    protected function find($pos, $token, $limit = 10)
    {
        $i = $pos;
        $o = $this->node->tokens;
        $c = $this->node->token_count;
        while (++$i < $c) {
            if ($o[$i][0] == $token) {
                return $i;
            }
            if (!empty($limit) && $i - $pos == $limit) {
                break;
            }
        }
        return false;
    }