GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 35-37 lines in 2 locations

src/Constraint/ConstraintManager.php 2 locations

@@ 119-153 (lines=35) @@
116
117
          if ($constraint->getMinDays() && $new_constraint->getMinDays() ||
118
              ($constraint->getMaxDays() && $new_constraint->getMaxDays())) {
119
            if ($start_date >= $new_start_date && $start_date <= $new_end_date) {
120
              $new_end_date_clone = clone($new_end_date);
121
              $constraint->setStartDate($new_end_date_clone->add(new \DateInterval('P1D')));
122
            }
123
            elseif ($end_date >= $new_start_date && $end_date <= $new_end_date) {
124
              $new_start_date_clone = clone($new_start_date);
125
              $constraint->setEndDate($new_start_date_clone->sub(new \DateInterval('P1D')));
126
            }
127
            elseif ($start_date < $new_start_date && $end_date > $new_end_date) {
128
              if ($constraint->getEndDate() > $new_start_date) {
129
                $new_start_date_clone = clone($new_start_date);
130
                $constraint->setEndDate($new_start_date_clone->sub(new \DateInterval('P1D')));
131
              }
132
133
              if ($split_constraint == NULL) {
134
                $split_start_date = clone($new_end_date);
135
                $split_start_date->add(new \DateInterval('P1D'));
136
                $split_end_date = $end_date;
137
138
                $split_constraint = new MinMaxDaysConstraint($constraint->getUnits(), $constraint->getMinDays(), $constraint->getMaxDays(), $split_start_date, $split_end_date, $constraint->getCheckinDay());
139
              }
140
              else {
141
                $split_start_date = $split_constraint->getStartDate();
142
                $split_end_date = $split_constraint->getEndDate();
143
144
                if ($split_start_date < $new_end_date) {
145
                  $new_end_date_clone = clone($new_end_date);
146
                  $split_constraint->setStartDate($new_end_date_clone->add(new \DateInterval('P1D')));
147
                }
148
                if ($split_end_date < $new_start_date) {
149
                  $new_start_date_clone = clone($new_start_date);
150
                  $split_constraint->setEndDate($new_start_date_clone->sub(new \DateInterval('P1D')));
151
                }
152
              }
153
            }
154
          }
155
        }
156
@@ 193-229 (lines=37) @@
190
          $new_start_date = $new_constraint->getStartDate();
191
          $new_end_date = $new_constraint->getEndDate();
192
193
          if ($constraint->getCheckinDay() && $new_constraint->getCheckinDay()) {
194
            if ($start_date >= $new_start_date && $start_date <= $new_end_date) {
195
              $new_end_date_clone = clone($new_end_date);
196
              $constraint->setStartDate($new_end_date_clone->add(new \DateInterval('P1D')));
197
            }
198
            elseif ($end_date >= $new_start_date && $end_date <= $new_end_date) {
199
              $new_start_date_clone = clone($new_start_date);
200
              $constraint->setEndDate($new_start_date_clone->sub(new \DateInterval('P1D')));
201
            }
202
            elseif ($start_date < $new_start_date && $end_date > $new_end_date) {
203
              if ($constraint->getEndDate() > $new_start_date) {
204
                $new_start_date_clone = clone($new_start_date);
205
                $constraint->setEndDate($new_start_date_clone->sub(new \DateInterval('P1D')));
206
              }
207
208
              if ($split_constraint == NULL) {
209
                $split_start_date = clone($new_end_date);
210
                $split_start_date->add(new \DateInterval('P1D'));
211
                $split_end_date = $end_date;
212
213
                $split_constraint = new CheckInDayConstraint($constraint->getUnits(), $constraint->getCheckinDay(), $split_start_date, $split_end_date);
214
              }
215
              else {
216
                $split_start_date = $split_constraint->getStartDate();
217
                $split_end_date = $split_constraint->getEndDate();
218
219
                if ($split_start_date < $new_end_date) {
220
                  $new_end_date_clone = clone($new_end_date);
221
                  $split_constraint->setStartDate($new_end_date_clone->add(new \DateInterval('P1D')));
222
                }
223
                if ($split_end_date < $new_start_date) {
224
                  $new_start_date_clone = clone($new_start_date);
225
                  $split_constraint->setEndDate($new_start_date_clone->sub(new \DateInterval('P1D')));
226
                }
227
              }
228
            }
229
          }
230
        }
231
232
        if ($split_constraint != NULL) {