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

@@ 318-337 (lines=20) @@
315
        $nextOpen = $openingHoursForDay->nextOpen(Time::fromDateTime($dateTime));
316
        $tries = $this->getDayLimit();
317
318
        while ($nextOpen === false || $nextOpen->hours() >= 24) {
319
            if (--$tries < 0) {
320
                throw MaximumLimitExceeded::forString(
321
                    'No open date/time found in the next '.$this->getDayLimit().' days,'.
322
                    ' use $openingHours->setDayLimit() to increase the limit.'
323
                );
324
            }
325
326
            $dateTime = $dateTime
327
                ->modify('+1 day')
328
                ->setTime(0, 0, 0);
329
330
            if ($this->isOpenAt($dateTime) && ! $openingHoursForDay->isOpenAt(Time::fromString('23:59'))) {
331
                return $dateTime;
332
            }
333
334
            $openingHoursForDay = $this->forDate($dateTime);
335
336
            $nextOpen = $openingHoursForDay->nextOpen(Time::fromDateTime($dateTime));
337
        }
338
339
        if ($dateTime->format('H:i') === '00:00' && $this->isOpenAt((clone $dateTime)->modify('-1 second'))) {
340
            return $this->nextOpen($dateTime->modify('+1 minute'));
@@ 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