Code Duplication    Length = 9-10 lines in 2 locations

lib/Doctrine/DBAL/Driver/OCI8/OCI8Connection.php 1 location

@@ 123-131 (lines=9) @@
120
    /**
121
     * {@inheritdoc}
122
     */
123
    public function quote($value, $type=\PDO::PARAM_STR)
124
    {
125
        if (is_int($value) || is_float($value)) {
126
            return $value;
127
        }
128
        $value = str_replace("'", "''", $value);
129
130
        return "'" . addcslashes($value, "\000\n\r\\\032") . "'";
131
    }
132
133
    /**
134
     * {@inheritdoc}

lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvConnection.php 1 location

@@ 106-115 (lines=10) @@
103
     * {@inheritDoc}
104
     * @license New BSD, code from Zend Framework
105
     */
106
    public function quote($value, $type=\PDO::PARAM_STR)
107
    {
108
        if (is_int($value)) {
109
            return $value;
110
        } elseif (is_float($value)) {
111
            return sprintf('%F', $value);
112
        }
113
114
        return "'" . str_replace("'", "''", $value) . "'";
115
    }
116
117
    /**
118
     * {@inheritDoc}