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 = 9-9 lines in 2 locations

src/Calendar/AbstractCalendar.php 2 locations

@@ 343-351 (lines=9) @@
340
                  // We are in hours and can add something
341
                  $end_event->add(new \DateInterval('PT1H'));
342
                }
343
                elseif (($current_value != $hour_value) && ($current_value !== NULL)) {
344
                  // Value just switched - let us wrap up with current event and start a new one
345
                  $normalized_events[$unit][] = new Event($start_event, $end_event, $unit, $current_value);
346
                  // Start event becomes the end event with a minute added
347
                  $start_event = clone($end_event->add(new \DateInterval('PT1M')));
348
                  // End event comes the current point in time
349
                  $end_event = new \DateTime($year . '-' . $month . '-' . substr($day, 1) . ' ' . substr($hour, 1) . ':00');
350
                  $current_value = $hour_value;
351
                }
352
                if ($current_value === NULL) {
353
                  // Got into hours and still haven't created an event so
354
                  $start_event = new \DateTime($year . '-' . $month . '-' . substr($day, 1) . ' ' . substr($hour, 1) . ':00');
@@ 365-373 (lines=9) @@
362
              // We are adding a whole day so the end event gets moved to the end of the day we are adding
363
              $end_event = new \DateTime($year . '-' . $month . '-' . substr($day, 1) . ' ' . '23:59');
364
            }
365
            elseif (($current_value !== $value) && ($current_value !== NULL)) {
366
              // Value just switched - let us wrap up with current event and start a new one
367
              $normalized_events[$unit][] = new Event($start_event, $end_event, $unit, $current_value);
368
              // Start event becomes the end event with a minute added
369
              $start_event = clone($end_event->add(new \DateInterval('PT1M')));
370
              // End event becomes the current day which we have not account for yet
371
              $end_event = new \DateTime($year . '-' . $month . '-' . substr($day, 1) . ' ' . '23:59');
372
              $current_value = $value;
373
            }
374
            if ($current_value === NULL) {
375
              // We have not created an event yet so let's do it now
376
              $start_event = new \DateTime($year . '-' . $month . '-' . substr($day, 1) . ' ' . '00:00');