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

@@ 226-232 (lines=7) @@
223
                $totals = Models\Server::select(DB::raw('SUM(memory) as memory, SUM(disk) as disk'))->where('node', $node->id)->first();
224
225
                // Check memory limits
226
                if (is_numeric($node->memory_overallocate)) {
227
                    $newMemory = $totals->memory + $data['memory'];
228
                    $memoryLimit = ($node->memory * (1 + ($node->memory_overallocate / 100)));
229
                    if ($newMemory > $memoryLimit) {
230
                        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.');
231
                    }
232
                }
233
234
                // Check Disk Limits
235
                if (is_numeric($node->disk_overallocate)) {
@@ 235-241 (lines=7) @@
232
                }
233
234
                // Check Disk Limits
235
                if (is_numeric($node->disk_overallocate)) {
236
                    $newDisk = $totals->disk + $data['disk'];
237
                    $diskLimit = ($node->disk * (1 + ($node->disk_overallocate / 100)));
238
                    if ($newDisk > $diskLimit) {
239
                        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.');
240
                    }
241
                }
242
            }
243
        }
244