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

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