librenms/librenms

View on GitHub
LibreNMS/Exceptions/FilePermissionsException.php

Summary

Maintainability
A
1 hr
Test Coverage

Method generateCommands has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    private function generateCommands($log_file): array
    {
        $user = config('librenms.user');
        $group = config('librenms.group');
        $install_dir = base_path();
Severity: Minor
Found in LibreNMS/Exceptions/FilePermissionsException.php - About 1 hr to fix

    Avoid unused parameters such as '$request'.
    Open

        public function render(\Illuminate\Http\Request $request)

    UnusedFormalParameter

    Since: 0.2

    Avoid passing parameters to methods or constructors and then not using those parameters.

    Example

    class Foo
    {
        private function bar($howdy)
        {
            // $howdy is not used
        }
    }

    Source https://phpmd.org/rules/unusedcode.html#unusedformalparameter

    There are no issues that match your filters.

    Category
    Status