Code Duplication    Length = 10-10 lines in 2 locations

lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php 1 location

@@ 478-487 (lines=10) @@
475
    /**
476
     * {@inheritdoc}
477
     */
478
    protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit)
479
    {
480
        $factorClause = '';
481
482
        if ('-' === $operator) {
483
            $factorClause = '-1 * ';
484
        }
485
486
        return 'DATEADD(' . $unit . ', ' . $factorClause . $interval . ', ' . $date . ')';
487
    }
488
489
    /**
490
     * {@inheritdoc}

lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php 1 location

@@ 75-84 (lines=10) @@
72
    /**
73
     * {@inheritdoc}
74
     */
75
    protected function getDateArithmeticIntervalExpression($date, $operator, $interval, $unit)
76
    {
77
        $factorClause = '';
78
79
        if ('-' === $operator) {
80
            $factorClause = '-1 * ';
81
        }
82
83
        return 'DATEADD(' . $unit . ', ' . $factorClause . $interval . ', ' . $date . ')';
84
    }
85
86
    /**
87
     * {@inheritDoc}