public function checkIsString($value = false, $expected = false)
    {
        if (!is_string($this->token) || ($value && ($this->token != $value))) {
            $this->bailUnexpectedToken($expected);
        }
    }
public function checkIsString($value = false, $expected = false)
    {
        if (!is_string($this->token) || ($value && ($this->token != $value))) {
            $this->bailUnexpectedToken($expected);
        }
    }
public function checkIsString ( $ value = false , $ expected = false ) { if ( ! is_string ( $ this -> token ) || ( $ value && ( $ this -> token != $ value ) ) ) { $ this -> bailUnexpectedToken ( $ expected ) ; } }
Ensure that the current token is a string.

@param mixed      $value    The Value that the current token shall have.

@param bool|mixed $expected The expected token type/value or false if unknown which one was expected.

@return void
Ensure that the current token is a string .