You are here

public function PHP_Token_Stream::offsetGet in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/php-token-stream/src/Token/Stream.php \PHP_Token_Stream::offsetGet()

Parameters

integer $offset:

Return value

mixed

Throws

OutOfBoundsException

File

vendor/phpunit/php-token-stream/src/Token/Stream.php, line 534

Class

PHP_Token_Stream
A stream of PHP tokens.

Code

public function offsetGet($offset) {
  if (!$this
    ->offsetExists($offset)) {
    throw new OutOfBoundsException(sprintf('No token at position "%s"', $offset));
  }
  return $this->tokens[$offset];
}