Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 483-494 (lines=12) @@
480
     * @param string $columnType column type added
481
     * @return string
482
     */
483
    protected function getDefaultValueDefinition($default, $columnType = null)
484
    {
485
        if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) {
486
            $default = $this->getConnection()->quote($default);
487
        } elseif (is_bool($default)) {
488
            $default = $this->castToBool($default);
489
        } elseif ($columnType === static::PHINX_TYPE_BOOLEAN) {
490
            $default = $this->castToBool((bool)$default);
491
        }
492
493
        return isset($default) ? " DEFAULT $default" : '';
494
    }
495
496
    /**
497
     * Executes all the ALTER TABLE instructions passed for the given table

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

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