private function unquoteString(string $str = null): ?string
    {
        if ($str) {
            if ('"' == substr($str, 0, 1)) {
                $str = substr($str, 1, \strlen($str) - 1);
            }
            if ('"' == substr($str, \strlen($str) - 1, 1)) {
                $str = substr($str, 0, \strlen($str) - 1);
            }
        }

        return $str;
    }
private function unquoteString(string $str = null): ?string
    {
        if ($str) {
            if ('"' == substr($str, 0, 1)) {
                $str = substr($str, 1, \strlen($str) - 1);
            }
            if ('"' == substr($str, \strlen($str) - 1, 1)) {
                $str = substr($str, 0, \strlen($str) - 1);
            }
        }

        return $str;
    }
private function unquoteString ( string $ str = null ) : ? string { if ( $ str ) { if ( '"' == substr ( $ str , 0 , 1 ) ) { $ str = substr ( $ str , 1 , \ strlen ( $ str ) - 1 ) ; } if ( '"' == substr ( $ str , \ strlen ( $ str ) - 1 , 1 ) ) { $ str = substr ( $ str , 0 , \ strlen ( $ str ) - 1 ) ; } } return $ str ; }
If a string contains quotation marks at either end this function will strip them. Otherwise it will remain unchanged.

@param string $str the string to be stripped of quotation marks

@return string returns the original string without the quotation marks at either end
If a string contains quotation marks at either end this function will strip them . Otherwise it will remain unchanged .