Code Duplication    Length = 6-6 lines in 2 locations

src/AppBundle/Validator/Constraints/DateRangeValidator.php 2 locations

@@ 65-70 (lines=6) @@
62
            $this->max = new \DateTime($this->max);
63
        }
64
65
        if (null !== $constraint->max && $value > $constraint->max) {
66
            $this->addViolation($constraint->maxMessage, array(
67
                '{{ value }}' => $this->formatDate($value),
68
                '{{ limit }}' => $this->formatDate($constraint->max)
69
            ));
70
        }
71
72
        if (null !== $constraint->min && $value < $constraint->min) {
73
            $this->addViolation($constraint->minMessage, array(
@@ 72-77 (lines=6) @@
69
            ));
70
        }
71
72
        if (null !== $constraint->min && $value < $constraint->min) {
73
            $this->addViolation($constraint->minMessage, array(
74
                '{{ value }}' => $this->formatDate($value),
75
                '{{ limit }}' => $this->formatDate($constraint->min)
76
            ));
77
        }
78
    }
79
80
    protected function formatDate($date)