halfpastfouram/PHPChartJS

View on GitHub
src/Options/Tooltips.php

Summary

Maintainability
D
1 day
Test Coverage

Tooltips has 64 functions (exceeds 20 allowed). Consider refactoring.
Open

class Tooltips implements ArraySerializableInterface, JsonSerializable
{
    use ArraySerializable;

    /**
Severity: Major
Found in src/Options/Tooltips.php - About 1 day to fix

    File Tooltips.php has 333 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    namespace Halfpastfour\PHPChartJS\Options;
    
    use Halfpastfour\PHPChartJS\ArraySerializableInterface;
    Severity: Minor
    Found in src/Options/Tooltips.php - About 4 hrs to fix

      The class Tooltips has an overall complexity of 65 which is very high. The configured complexity threshold is 50.
      Open

      class Tooltips implements ArraySerializableInterface, JsonSerializable
      {
          use ArraySerializable;
      
          /**
      Severity: Minor
      Found in src/Options/Tooltips.php by phpmd

      The class Tooltips has 64 public methods and attributes. Consider reducing the number of public items to less than 45.
      Open

      class Tooltips implements ArraySerializableInterface, JsonSerializable
      {
          use ArraySerializable;
      
          /**
      Severity: Minor
      Found in src/Options/Tooltips.php by phpmd

      ExcessivePublicCount

      Since: 0.1

      A large number of public methods and attributes declared in a class can indicate the class may need to be broken up as increased effort will be required to thoroughly test it.

      Example

      public class Foo {
          public $value;
          public $something;
          public $var;
          // [... more more public attributes ...]
      
          public function doWork() {}
          public function doMoreWork() {}
          public function doWorkAgain() {}
          // [... more more public methods ...]
      }

      Source https://phpmd.org/rules/codesize.html#excessivepubliccount

      There are no issues that match your filters.

      Category
      Status