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

@@ 228-232 (lines=5) @@
225
            $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]);
226
          }
227
        }
228
        else {
229
          foreach ($days as $day => $value) {
230
            $result[$year][$month][$day] = $keyed_units[$unit]->getDefaultValue();
231
          }
232
        }
233
      }
234
    }
235
@@ 259-262 (lines=4) @@
256
            if (isset($db_events[$unit][Event::BAT_HOUR][$year][$month][$day][$hour])) {
257
              $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]);
258
            }
259
            else {
260
              // If nothing from db - then revert to the defaults
261
              $result[$year][$month][$day][$hour] = (int) $keyed_units[$unit]->getDefaultValue();
262
            }
263
          }
264
        }
265
      }
@@ 306-309 (lines=4) @@
303
              if (isset($db_events[$unit][Event::BAT_MINUTE][$year][$month][$day][$hour][$minute])) {
304
                $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]);
305
              }
306
              else {
307
                // If nothing from db - then revert to the defaults
308
                $result[$year][$month][$day][$hour][$minute] = (int) $keyed_units[$unit]->getDefaultValue();
309
              }
310
            }
311
          }
312
        }