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

app/Repositories/ServerRepository.php 2 locations

@@ 214-220 (lines=7) @@
211
                $totals = Models\Server::select(DB::raw('SUM(memory) as memory, SUM(disk) as disk'))->where('node_id', $node->id)->first();
212
213
                // Check memory limits
214
                if (is_numeric($node->memory_overallocate)) {
215
                    $newMemory = $totals->memory + $data['memory'];
216
                    $memoryLimit = ($node->memory * (1 + ($node->memory_overallocate / 100)));
217
                    if ($newMemory > $memoryLimit) {
218
                        throw new DisplayException('The amount of memory allocated to this server would put the node over its allocation limits. This node is allowed ' . ($node->memory_overallocate + 100) . '% of its assigned ' . $node->memory . 'Mb of memory (' . $memoryLimit . 'Mb) of which ' . (($totals->memory / $node->memory) * 100) . '% (' . $totals->memory . 'Mb) is in use already. By allocating this server the node would be at ' . (($newMemory / $node->memory) * 100) . '% (' . $newMemory . 'Mb) usage.');
219
                    }
220
                }
221
222
                // Check Disk Limits
223
                if (is_numeric($node->disk_overallocate)) {
@@ 223-229 (lines=7) @@
220
                }
221
222
                // Check Disk Limits
223
                if (is_numeric($node->disk_overallocate)) {
224
                    $newDisk = $totals->disk + $data['disk'];
225
                    $diskLimit = ($node->disk * (1 + ($node->disk_overallocate / 100)));
226
                    if ($newDisk > $diskLimit) {
227
                        throw new DisplayException('The amount of disk allocated to this server would put the node over its allocation limits. This node is allowed ' . ($node->disk_overallocate + 100) . '% of its assigned ' . $node->disk . 'Mb of disk (' . $diskLimit . 'Mb) of which ' . (($totals->disk / $node->disk) * 100) . '% (' . $totals->disk . 'Mb) is in use already. By allocating this server the node would be at ' . (($newDisk / $node->disk) * 100) . '% (' . $newDisk . 'Mb) usage.');
228
                    }
229
                }
230
            }
231
        }
232