private function parseErrorIsUnclosedString(\PhpParser\Error $e, $code)
    {
        if ($e->getRawMessage() !== 'Syntax error, unexpected T_ENCAPSED_AND_WHITESPACE') {
            return false;
        }

        try {
            $this->parser->parse($code . "';");
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
private function parseErrorIsUnclosedString(\PhpParser\Error $e, $code)
    {
        if ($e->getRawMessage() !== 'Syntax error, unexpected T_ENCAPSED_AND_WHITESPACE') {
            return false;
        }

        try {
            $this->parser->parse($code . "';");
        } catch (\Exception $e) {
            return false;
        }

        return true;
    }
private function parseErrorIsUnclosedString ( \ PhpParser \ Error $ e , $ code ) { if ( $ e -> getRawMessage ( ) !== 'Syntax error, unexpected T_ENCAPSED_AND_WHITESPACE' ) { return false ; } try { $ this -> parser -> parse ( $ code . "';" ) ; } catch ( \ Exception $ e ) { return false ; } return true ; }
A special test for unclosed single-quoted strings.

Unlike (all?) other unclosed statements, single quoted strings have
their own special beautiful snowflake syntax error just for
themselves.

@param \PhpParser\Error $e
@param string           $code

@return bool
A special test for unclosed single - quoted strings .