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 = 4-5 lines in 3 locations

src/Calendar/AbstractCalendar.php 3 locations

@@ 238-242 (lines=5) @@
235
            $result[$year][$month][$day] = ((int)$db_events[$unit][Event::BAT_DAY][$year][$month][$day] == 0 ? $keyed_units[$unit]->getDefaultValue() : (int)$db_events[$unit][Event::BAT_DAY][$year][$month][$day]);
236
          }
237
        }
238
        else {
239
          foreach ($days as $day => $value) {
240
            $result[$year][$month][$day] = $keyed_units[$unit]->getDefaultValue();
241
          }
242
        }
243
      }
244
    }
245
@@ 270-273 (lines=4) @@
267
              if (isset($db_events[$unit][Event::BAT_HOUR][$year][$month][$day][$hour])) {
268
                $result[$year][$month][$day][$hour] = ((int) $db_events[$unit][Event::BAT_HOUR][$year][$month][$day][$hour] == 0 ? $keyed_units[$unit]->getDefaultValue() : (int) $db_events[$unit][Event::BAT_HOUR][$year][$month][$day][$hour]);
269
              }
270
              else {
271
                // If nothing from db - then revert to the defaults
272
                $result[$year][$month][$day][$hour] = (int) $keyed_units[$unit]->getDefaultValue();
273
              }
274
            }
275
          }
276
        }
@@ 319-322 (lines=4) @@
316
                if (isset($db_events[$unit][Event::BAT_MINUTE][$year][$month][$day][$hour][$minute])) {
317
                  $result[$year][$month][$day][$hour][$minute] = ((int) $db_events[$unit][Event::BAT_MINUTE][$year][$month][$day][$hour][$minute] == 0 ? $keyed_units[$unit]->getDefaultValue() : (int) $db_events[$unit][Event::BAT_MINUTE][$year][$month][$day][$hour][$minute]);
318
                }
319
                else {
320
                  // If nothing from db - then revert to the defaults
321
                  $result[$year][$month][$day][$hour][$minute] = (int) $keyed_units[$unit]->getDefaultValue();
322
                }
323
              }
324
            }
325
          }