howardjones/network-weathermap

View on GitHub
cacti-pick.php

Summary

Maintainability
A
0 mins
Test Coverage

Remove this commented out code.
Open

# $cacti_base = "/var/www/html/cacti-0.8.8h";
Severity: Major
Found in cacti-pick.php by sonar-php

Programmers should not comment out code as it bloats programs and reduces readability.

Unused code should be deleted and can be retrieved from source control history if required.

See

  • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
  • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
  • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
  • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

Merge this if statement with the enclosing one.
Open

    if (substr($config['cacti_version'], 0, 2) == "1.") {
Severity: Major
Found in cacti-pick.php by sonar-php

Merging collapsible if statements increases the code's readability.

Noncompliant Code Example

if (condition1) {
  if (condition2) {
    ...
  }
}

Compliant Solution

if (condition1 && condition2) {
  ...
}

There are no issues that match your filters.

Category
Status