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

@@ 213-219 (lines=7) @@
210
                $totals = Models\Server::select(DB::raw('SUM(memory) as memory, SUM(disk) as disk'))->where('node_id', $node->id)->first();
211
212
                // Check memory limits
213
                if (is_numeric($node->memory_overallocate)) {
214
                    $newMemory = $totals->memory + $data['memory'];
215
                    $memoryLimit = ($node->memory * (1 + ($node->memory_overallocate / 100)));
216
                    if ($newMemory > $memoryLimit) {
217
                        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.');
218
                    }
219
                }
220
221
                // Check Disk Limits
222
                if (is_numeric($node->disk_overallocate)) {
@@ 222-228 (lines=7) @@
219
                }
220
221
                // Check Disk Limits
222
                if (is_numeric($node->disk_overallocate)) {
223
                    $newDisk = $totals->disk + $data['disk'];
224
                    $diskLimit = ($node->disk * (1 + ($node->disk_overallocate / 100)));
225
                    if ($newDisk > $diskLimit) {
226
                        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.');
227
                    }
228
                }
229
            }
230
        }
231