Code Duplication    Length = 14-14 lines in 2 locations

src/Superdesk/ContentApiSdk/API/Request/RequestParameters.php 2 locations

@@ 109-122 (lines=14) @@
106
     *
107
     * @param string|DateTime|null $startDate
108
     */
109
    public function setStartDate($startDate)
110
    {
111
        if ($startDate !== null) {
112
            try {
113
                $this->startDate = $this->validateDate($startDate);
114
            } catch (InvalidArgumentException $e) {
115
                throw new InvalidArgumentException('Invalid value for start_date parameter.', $e->getCode(), $e);
116
            }
117
        } else {
118
            $this->startDate = null;
119
        }
120
121
        return $this;
122
    }
123
124
    /**
125
     * Returns end date.
@@ 140-153 (lines=14) @@
137
     *
138
     * @param string|DateTime|null $endDate
139
     */
140
    public function setEndDate($endDate)
141
    {
142
        if ($endDate !== null) {
143
            try {
144
                $this->endDate = $this->validateDate($endDate);
145
            } catch (InvalidArgumentException $e) {
146
                throw new InvalidArgumentException('Invalid value for end_date parameter.', $e->getCode(), $e);
147
            }
148
        } else {
149
            $this->endDate = $endDate;
150
        }
151
152
        return $this;
153
    }
154
155
    /**
156
     * Returns text query.