Code Duplication    Length = 12-12 lines in 2 locations

src/Phinx/Db/Adapter/PdoAdapter.php 1 location

@@ 436-447 (lines=12) @@
433
     * @param string $columnType column type added
434
     * @return string
435
     */
436
    protected function getDefaultValueDefinition($default, $columnType = null)
437
    {
438
        if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) {
439
            $default = $this->getConnection()->quote($default);
440
        } elseif (is_bool($default)) {
441
            $default = $this->castToBool($default);
442
        } elseif ($columnType === static::PHINX_TYPE_BOOLEAN) {
443
            $default = $this->castToBool((bool)$default);
444
        }
445
446
        return isset($default) ? " DEFAULT $default" : '';
447
    }
448
}
449

src/Phinx/Db/Adapter/PostgresAdapter.php 1 location

@@ 953-964 (lines=12) @@
950
     * @param string $columnType column type added
951
     * @return string
952
     */
953
    protected function getDefaultValueDefinition($default, $columnType = null)
954
    {
955
        if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) {
956
            $default = $this->getConnection()->quote($default);
957
        } elseif (is_bool($default)) {
958
            $default = $this->castToBool($default);
959
        } elseif ($columnType === static::PHINX_TYPE_BOOLEAN) {
960
            $default = $this->castToBool((bool)$default);
961
        }
962
963
        return isset($default) ? 'DEFAULT ' . $default : '';
964
    }
965
966
    /**
967
     * Gets the PostgreSQL Column Definition for a Column object.