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

@@ 352-371 (lines=20) @@
349
        $nextOpen = $openingHoursForDay->nextOpen(Time::fromDateTime($dateTime));
350
        $tries = $this->getDayLimit();
351
352
        while ($nextOpen === false || $nextOpen->hours() >= 24) {
353
            if (--$tries < 0) {
354
                throw MaximumLimitExceeded::forString(
355
                    'No open date/time found in the next '.$this->getDayLimit().' days,'.
356
                    ' use $openingHours->setDayLimit() to increase the limit.'
357
                );
358
            }
359
360
            $dateTime = $dateTime
361
                ->modify('+1 day')
362
                ->setTime(0, 0, 0);
363
364
            if ($this->isOpenAt($dateTime) && ! $openingHoursForDay->isOpenAt(Time::fromString('23:59'))) {
365
                return $dateTime;
366
            }
367
368
            $openingHoursForDay = $this->forDate($dateTime);
369
370
            $nextOpen = $openingHoursForDay->nextOpen(Time::fromDateTime($dateTime));
371
        }
372
373
        if ($dateTime->format('H:i') === '00:00' && $this->isOpenAt((clone $dateTime)->modify('-1 second'))) {
374
            return $this->nextOpen($dateTime->modify('+1 minute'));
@@ 405-424 (lines=20) @@
402
403
        $tries = $this->getDayLimit();
404
405
        while ($nextClose === false || $nextClose->hours() >= 24) {
406
            if (--$tries < 0) {
407
                throw MaximumLimitExceeded::forString(
408
                    'No close date/time found in the next '.$this->getDayLimit().' days,'.
409
                    ' use $openingHours->setDayLimit() to increase the limit.'
410
                );
411
            }
412
413
            $dateTime = $dateTime
414
                ->modify('+1 day')
415
                ->setTime(0, 0, 0);
416
417
            if ($this->isClosedAt($dateTime) && $openingHoursForDay->isOpenAt(Time::fromString('23:59'))) {
418
                return $dateTime;
419
            }
420
421
            $openingHoursForDay = $this->forDate($dateTime);
422
423
            $nextClose = $openingHoursForDay->nextClose(Time::fromDateTime($dateTime));
424
        }
425
426
        $nextDateTime = $nextClose->toDateTime();
427