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

src/OpeningHours.php 2 locations

@@ 439-458 (lines=20) @@
436
        $previousOpen = $openingHoursForDay->previousOpen(Time::fromDateTime($dateTime));
437
        $tries = $this->getDayLimit();
438
439
        while ($previousOpen === false || ($previousOpen->hours() === 0 && $previousOpen->minutes() === 0)) {
440
            if (--$tries < 0) {
441
                throw MaximumLimitExceeded::forString(
442
                    'No open date/time found in the previous '.$this->getDayLimit().' days,'.
443
                    ' use $openingHours->setDayLimit() to increase the limit.'
444
                );
445
            }
446
447
            $midnight = $dateTime->setTime(0, 0, 0);
448
            $dateTime = clone $midnight;
449
            $dateTime = $dateTime->modify('-1 minute');
450
451
            $openingHoursForDay = $this->forDate($dateTime);
452
453
            if ($this->isOpenAt($midnight) && ! $openingHoursForDay->isOpenAt(Time::fromString('23:59'))) {
454
                return $midnight;
455
            }
456
457
            $previousOpen = $openingHoursForDay->previousOpen(Time::fromDateTime($dateTime));
458
        }
459
460
        $nextDateTime = $previousOpen->toDateTime();
461
@@ 485-503 (lines=19) @@
482
483
        $tries = $this->getDayLimit();
484
485
        while ($previousClose === false || ($previousClose->hours() === 0 && $previousClose->minutes() === 0)) {
486
            if (--$tries < 0) {
487
                throw MaximumLimitExceeded::forString(
488
                    'No close date/time found in the previous '.$this->getDayLimit().' days,'.
489
                    ' use $openingHours->setDayLimit() to increase the limit.'
490
                );
491
            }
492
493
            $midnight = $dateTime->setTime(0, 0, 0);
494
            $dateTime = clone $midnight;
495
            $dateTime = $dateTime->modify('-1 minute');
496
            $openingHoursForDay = $this->forDate($dateTime);
497
498
            if ($this->isClosedAt($midnight) && $openingHoursForDay->isOpenAt(Time::fromString('23:59'))) {
499
                return $midnight;
500
            }
501
502
            $previousClose = $openingHoursForDay->previousClose(Time::fromDateTime($dateTime));
503
        }
504
505
        $previousDateTime = $previousClose->toDateTime();
506