classes/PhpSourceStream.php
public function getNextExpected($expectedCode)
    {
        $token = $this->getNext();
        if ($this->getCurrentCode() != $expectedCode) {
            return null;
        }

        return $token;
    }
public function getNextExpected($expectedCode)
    {
        $token = $this->getNext();
        if ($this->getCurrentCode() != $expectedCode) {
            return null;
        }

        return $token;
    }
public function getNextExpected ( $ expectedCode ) { $ token = $ this -> getNext ( ) ; if ( $ this -> getCurrentCode ( ) != $ expectedCode ) { return null ; } return $ token ; }
Reads the next token, updates the head and and returns the token if it has the expected code.
@param integer $expectedCode Specifies the code to expect.
@return mixed Returns the token or null if the token code was not expected.
Reads the next token updates the head and and returns the token if it has the expected code .