librenms/librenms

View on GitHub
daily.php

Summary

Maintainability
B
4 hrs
Test Coverage

File daily.php has 317 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#!/usr/bin/env php
<?php

/*
 * Daily Task Checks
Severity: Minor
Found in daily.php - About 3 hrs to fix

    Avoid deeply nested control flow statements.
    Open

                    if (empty($limit)) {
                        break;
                    }
    Severity: Major
    Found in daily.php - About 45 mins to fix

      Only one argument is allowed per line in a multi-line function call
      Open

                  Notifications::create($title, "The daily update script (daily.sh) has failed on $poller_name."
      Severity: Minor
      Found in daily.php by phpcodesniffer

      Opening parenthesis of a multi-line function call must be the last content on the line
      Open

                      Notifications::create($error_title,
      Severity: Minor
      Found in daily.php by phpcodesniffer

      Opening parenthesis of a multi-line function call must be the last content on the line
      Open

                      Notifications::create($error_title,
      Severity: Minor
      Found in daily.php by phpcodesniffer

      Opening parenthesis of a multi-line function call must be the last content on the line
      Open

                  Notifications::create($title, "The daily update script (daily.sh) has failed on $poller_name."
      Severity: Minor
      Found in daily.php by phpcodesniffer

      Opening parenthesis of a multi-line function call must be the last content on the line
      Open

                      Notifications::create($error_title,
      Severity: Minor
      Found in daily.php by phpcodesniffer

      There are no issues that match your filters.

      Category
      Status