src/TokenStream.php
public function expect($type)
    {
        if (!$this->valid() || !$this->current()->test($type)) {
            throw new \UnexpectedValueException(sprintf(
                'Exepcted token with the type "%s", got "%s" with value "%s"',
                implode('|', (array)$type),
                $this->valid() ? $this->current()->name : 'T_ENDOFSTREAM',
                $this->valid() ? $this->current()->value : 'null'
            ));
        }
    }
public function expect($type)
    {
        if (!$this->valid() || !$this->current()->test($type)) {
            throw new \UnexpectedValueException(sprintf(
                'Exepcted token with the type "%s", got "%s" with value "%s"',
                implode('|', (array)$type),
                $this->valid() ? $this->current()->name : 'T_ENDOFSTREAM',
                $this->valid() ? $this->current()->value : 'null'
            ));
        }
    }
{@inheritdoc}