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

src/OpeningHours.php 2 locations

@@ 425-444 (lines=20) @@
422
423
        $tries = $this->getDayLimit();
424
425
        while ($nextClose === false || $nextClose->hours() >= 24) {
426
            if (--$tries < 0) {
427
                throw MaximumLimitExceeded::forString(
428
                    'No close date/time found in the next '.$this->getDayLimit().' days,'.
429
                    ' use $openingHours->setDayLimit() to increase the limit.'
430
                );
431
            }
432
433
            $dateTime = $dateTime
434
                ->modify('+1 day')
435
                ->setTime(0, 0, 0);
436
437
            if ($this->isClosedAt($dateTime) && $openingHoursForDay->isOpenAt(Time::fromString('23:59'))) {
438
                return $dateTime;
439
            }
440
441
            $openingHoursForDay = $this->forDate($dateTime);
442
443
            $nextClose = $openingHoursForDay->nextClose(Time::fromDateTime($dateTime));
444
        }
445
446
        $nextDateTime = $nextClose->toDateTime();
447
@@ 372-391 (lines=20) @@
369
        $nextOpen = $openingHoursForDay->nextOpen(Time::fromDateTime($dateTime));
370
        $tries = $this->getDayLimit();
371
372
        while ($nextOpen === false || $nextOpen->hours() >= 24) {
373
            if (--$tries < 0) {
374
                throw MaximumLimitExceeded::forString(
375
                    'No open date/time found in the next '.$this->getDayLimit().' days,'.
376
                    ' use $openingHours->setDayLimit() to increase the limit.'
377
                );
378
            }
379
380
            $dateTime = $dateTime
381
                ->modify('+1 day')
382
                ->setTime(0, 0, 0);
383
384
            if ($this->isOpenAt($dateTime) && ! $openingHoursForDay->isOpenAt(Time::fromString('23:59'))) {
385
                return $dateTime;
386
            }
387
388
            $openingHoursForDay = $this->forDate($dateTime);
389
390
            $nextOpen = $openingHoursForDay->nextOpen(Time::fromDateTime($dateTime));
391
        }
392
393
        if ($dateTime->format('H:i') === '00:00' && $this->isOpenAt((clone $dateTime)->modify('-1 second'))) {
394
            return $this->nextOpen($dateTime->modify('+1 minute'));