src/Phossa/Query/Dialect/Common.php
public function quote(
        /*# string */ $string,
        /*# bool */ $quote = DialectInterface::QUOTE_YES
    )/*# : string */ {
        $pref = $this->quote_prefix;
        $suff = $this->quote_suffix;

        // space found
        if (preg_match("/[ \n(),]/", $string)) {
            // quote it anyway
            if ($quote & DialectInterface::QUOTE_SPACE) {
                return sprintf('%s%s%s', $pref, $string, $suff);

            // abort
            } else {
                return $string;
            }
        }

        if ($quote & DialectInterface::QUOTE_YES) {
            $string = preg_replace_callback(
                '/\b([0-9a-zA-Z\$_]++)\b/',
                function($m) use ($pref, $suff) {
                    return sprintf('%s%s%s', $pref, $m[1], $suff);
                },
                $string
            );
        }
        return $string;
    }
public function quote(
        /*# string */ $string,
        /*# bool */ $quote = DialectInterface::QUOTE_YES
    )/*# : string */ {
        $pref = $this->quote_prefix;
        $suff = $this->quote_suffix;

        // space found
        if (preg_match("/[ \n(),]/", $string)) {
            // quote it anyway
            if ($quote & DialectInterface::QUOTE_SPACE) {
                return sprintf('%s%s%s', $pref, $string, $suff);

            // abort
            } else {
                return $string;
            }
        }

        if ($quote & DialectInterface::QUOTE_YES) {
            $string = preg_replace_callback(
                '/\b([0-9a-zA-Z\$_]++)\b/',
                function($m) use ($pref, $suff) {
                    return sprintf('%s%s%s', $pref, $m[1], $suff);
                },
                $string
            );
        }
        return $string;
    }
{@inheritDoc}