Code Duplication    Length = 4-7 lines in 2 locations

source/Spiral/Database/Drivers/SQLServer/Schemas/SQLServerColumn.php 2 locations

@@ 342-345 (lines=4) @@
339
            return;
340
        }
341
342
        if ($this->defaultValue[0] == '(' && $this->defaultValue[strlen($this->defaultValue) - 1] == ')') {
343
            //Cut braces
344
            $this->defaultValue = substr($this->defaultValue, 1, -1);
345
        }
346
347
        if (preg_match('/^[\'""].*?[\'"]$/', $this->defaultValue)) {
348
            $this->defaultValue = substr($this->defaultValue, 1, -1);
@@ 351-357 (lines=7) @@
348
            $this->defaultValue = substr($this->defaultValue, 1, -1);
349
        }
350
351
        if (
352
            $this->phpType() != 'string'
353
            && ($this->defaultValue[0] == '(' && $this->defaultValue[strlen($this->defaultValue) - 1] == ')')
354
        ) {
355
            //Cut another braces
356
            $this->defaultValue = substr($this->defaultValue, 1, -1);
357
        }
358
    }
359
360
    /**