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

src/OpeningHours.php 2 locations

@@ 596-605 (lines=10) @@
593
594
    public function asStructuredData(string $format = 'H:i', $timezone = null): array
595
    {
596
        $regularHours = $this->flatMap(function (OpeningHoursForDay $openingHoursForDay, string $day) use ($format, $timezone) {
597
            return $openingHoursForDay->map(function (TimeRange $timeRange) use ($format, $timezone, $day) {
598
                return [
599
                    '@type' => 'OpeningHoursSpecification',
600
                    'dayOfWeek' => ucfirst($day),
601
                    'opens' => $timeRange->start()->format($format, $timezone),
602
                    'closes' => $timeRange->end()->format($format, $timezone),
603
                ];
604
            });
605
        });
606
607
        $exceptions = $this->flatMapExceptions(function (OpeningHoursForDay $openingHoursForDay, string $date) use ($format, $timezone) {
608
            if ($openingHoursForDay->isEmpty()) {
@@ 620-628 (lines=9) @@
617
                ]];
618
            }
619
620
            return $openingHoursForDay->map(function (TimeRange $timeRange) use ($format, $date, $timezone) {
621
                return [
622
                    '@type' => 'OpeningHoursSpecification',
623
                    'opens' => $timeRange->start()->format($format, $timezone),
624
                    'closes' => $timeRange->end()->format($format, $timezone),
625
                    'validFrom' => $date,
626
                    'validThrough' => $date,
627
                ];
628
            });
629
        });
630
631
        return array_merge($regularHours, $exceptions);