Code Duplication    Length = 12-12 lines in 2 locations

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

@@ 467-478 (lines=12) @@
464
     * @param string $columnType column type added
465
     * @return string
466
     */
467
    protected function getDefaultValueDefinition($default, $columnType = null)
468
    {
469
        if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) {
470
            $default = $this->getConnection()->quote($default);
471
        } elseif (is_bool($default)) {
472
            $default = $this->castToBool($default);
473
        } elseif ($columnType === static::PHINX_TYPE_BOOLEAN) {
474
            $default = $this->castToBool((bool)$default);
475
        }
476
477
        return isset($default) ? " DEFAULT $default" : '';
478
    }
479
480
    /**
481
     * Executes all the ALTER TABLE instructions passed for the given table

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

@@ 932-943 (lines=12) @@
929
     * @param string $columnType column type added
930
     * @return string
931
     */
932
    protected function getDefaultValueDefinition($default, $columnType = null)
933
    {
934
        if (is_string($default) && 'CURRENT_TIMESTAMP' !== $default) {
935
            $default = $this->getConnection()->quote($default);
936
        } elseif (is_bool($default)) {
937
            $default = $this->castToBool($default);
938
        } elseif ($columnType === static::PHINX_TYPE_BOOLEAN) {
939
            $default = $this->castToBool((bool)$default);
940
        }
941
942
        return isset($default) ? 'DEFAULT ' . $default : '';
943
    }
944
945
    /**
946
     * Gets the PostgreSQL Column Definition for a Column object.