howardjones/network-weathermap

View on GitHub
lib/Weathermap/Tests/GeometryTest.php

Summary

Maintainability
A
3 hrs
Test Coverage

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

    public function testVector()
    {
        $infiniteSlope = 10000000000.0;

        $vector1 = new Vector(0, 0);
Severity: Minor
Found in lib/Weathermap/Tests/GeometryTest.php - About 1 hr to fix

    Method testPoint has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        public function testPoint()
        {
            $point1 = new Point(10, 13);
            $point2 = new Point(-40, 40);
            $point3 = new Point(30, 33);
    Severity: Minor
    Found in lib/Weathermap/Tests/GeometryTest.php - About 1 hr to fix

      Remove this commented out code.
      Open

      //require_once dirname(__FILE__).'/../lib/all.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"

      Remove this commented out code.
      Open

      //        $vector2 = $point1->vectorToPoint($point2);

      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"

      There are no issues that match your filters.

      Category
      Status