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 = 16-18 lines in 2 locations

src/Store/DrupalDBStore.php 2 locations

@@ 102-119 (lines=18) @@
99
100
      if ($granularity == Event::BAT_HOURLY) {
101
        // Write Hours
102
        foreach ($itemized[Event::BAT_HOUR] as $year => $months) {
103
          foreach ($months as $month => $days) {
104
            foreach ($days as $day => $hours) {
105
              // Count required as we may receive empty hours for granular events that start and end on midnight
106
              if (count($hours) > 0) {
107
                db_merge($this->hour_table)
108
                  ->key(array(
109
                    'unit_id' => $event->unit_id,
110
                    'year' => $year,
111
                    'month' => $month,
112
                    'day' => substr($day, 1)
113
                  ))
114
                  ->fields($hours)
115
                  ->execute();
116
              }
117
            }
118
          }
119
        }
120
121
        //If we have minutes write minutes
122
        foreach ($itemized[Event::BAT_MINUTE] as $year => $months) {
@@ 123-138 (lines=16) @@
120
121
        //If we have minutes write minutes
122
        foreach ($itemized[Event::BAT_MINUTE] as $year => $months) {
123
          foreach ($months as $month => $days) {
124
            foreach ($days as $day => $hours) {
125
              foreach ($hours as $hour => $minutes) {
126
                db_merge($this->minute_table)
127
                  ->key(array(
128
                    'unit_id' => $event->unit_id,
129
                    'year' => $year,
130
                    'month' => $month,
131
                    'day' => substr($day, 1),
132
                    'hour' => substr($hour, 1)
133
                  ))
134
                  ->fields($minutes)
135
                  ->execute();
136
              }
137
            }
138
          }
139
        }
140
      }
141
    }