Code Duplication    Length = 13-13 lines in 2 locations

src/Database/Schema/SqliteSchema.php 1 location

@@ 187-199 (lines=13) @@
184
     * @param string|null $default The default value.
185
     * @return string|null
186
     */
187
    protected function _defaultValue($default)
188
    {
189
        if ($default === 'NULL') {
190
            return null;
191
        }
192
193
        // Remove quotes
194
        if (preg_match("/^'(.*)'$/", $default, $matches)) {
195
            return str_replace("''", "'", $matches[1]);
196
        }
197
198
        return $default;
199
    }
200
201
    /**
202
     * {@inheritDoc}

src/Database/Schema/SqlserverSchema.php 1 location

@@ 195-207 (lines=13) @@
192
     * @param string|null $default The default value.
193
     * @return string|null
194
     */
195
    protected function _defaultValue($default)
196
    {
197
        if ($default === 'NULL') {
198
            return null;
199
        }
200
201
        // Remove quotes
202
        if (preg_match("/^N?'(.*)'/", $default, $matches)) {
203
            return str_replace("''", "'", $matches[1]);
204
        }
205
206
        return $default;
207
    }
208
209
    /**
210
     * {@inheritDoc}