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

@@ 458-477 (lines=20) @@
455
        $previousOpen = $openingHoursForDay->previousOpen(Time::fromDateTime($dateTime));
456
        $tries = $this->getDayLimit();
457
458
        while ($previousOpen === false || ($previousOpen->hours() === 0 && $previousOpen->minutes() === 0)) {
459
            if (--$tries < 0) {
460
                throw MaximumLimitExceeded::forString(
461
                    'No open date/time found in the previous '.$this->getDayLimit().' days,'.
462
                    ' use $openingHours->setDayLimit() to increase the limit.'
463
                );
464
            }
465
466
            $midnight = $dateTime->setTime(0, 0, 0);
467
            $dateTime = clone $midnight;
468
            $dateTime = $dateTime->modify('-1 minute');
469
470
            $openingHoursForDay = $this->forDate($dateTime);
471
472
            if ($this->isOpenAt($midnight) && ! $openingHoursForDay->isOpenAt(Time::fromString('23:59'))) {
473
                return $midnight;
474
            }
475
476
            $previousOpen = $openingHoursForDay->previousOpen(Time::fromDateTime($dateTime));
477
        }
478
479
        $nextDateTime = $previousOpen->toDateTime();
480
@@ 503-521 (lines=19) @@
500
501
        $tries = $this->getDayLimit();
502
503
        while ($previousClose === false || ($previousClose->hours() === 0 && $previousClose->minutes() === 0)) {
504
            if (--$tries < 0) {
505
                throw MaximumLimitExceeded::forString(
506
                    'No close date/time found in the previous '.$this->getDayLimit().' days,'.
507
                    ' use $openingHours->setDayLimit() to increase the limit.'
508
                );
509
            }
510
511
            $midnight = $dateTime->setTime(0, 0, 0);
512
            $dateTime = clone $midnight;
513
            $dateTime = $dateTime->modify('-1 minute');
514
            $openingHoursForDay = $this->forDate($dateTime);
515
516
            if ($this->isClosedAt($midnight) && $openingHoursForDay->isOpenAt(Time::fromString('23:59'))) {
517
                return $midnight;
518
            }
519
520
            $previousClose = $openingHoursForDay->previousClose(Time::fromDateTime($dateTime));
521
        }
522
523
        $previousDateTime = $previousClose->toDateTime();
524