src/Phan/AST/Visitor/KindVisitorImplementation.php

Summary

Maintainability
D
2 days
Test Coverage

KindVisitorImplementation has 107 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class KindVisitorImplementation implements KindVisitor
{

    /**
     * The fallback implementation for node kinds where the subclass visitor
Severity: Major
Found in src/Phan/AST/Visitor/KindVisitorImplementation.php - About 2 days to fix

    File KindVisitorImplementation.php has 437 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    
    declare(strict_types=1);
    
    namespace Phan\AST\Visitor;
    Severity: Minor
    Found in src/Phan/AST/Visitor/KindVisitorImplementation.php - About 6 hrs to fix

      The class KindVisitorImplementation has 107 non-getter- and setter-methods. Consider refactoring KindVisitorImplementation to keep number of methods under 25.
      Open

      abstract class KindVisitorImplementation implements KindVisitor
      {
      
          /**
           * The fallback implementation for node kinds where the subclass visitor

      TooManyMethods

      Since: 0.1

      A class with too many methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      The default was changed from 10 to 25 in PHPMD 2.3.

      Example

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

      The class KindVisitorImplementation has 107 public methods. Consider refactoring KindVisitorImplementation to keep number of public methods under 10.
      Open

      abstract class KindVisitorImplementation implements KindVisitor
      {
      
          /**
           * The fallback implementation for node kinds where the subclass visitor

      TooManyPublicMethods

      Since: 0.1

      A class with too many public methods is probably a good suspect for refactoring, in order to reduce its complexity and find a way to have more fine grained objects.

      By default it ignores methods starting with 'get' or 'set'.

      Example

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

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

      abstract class KindVisitorImplementation implements KindVisitor
      {
      
          /**
           * The fallback implementation for node kinds where the subclass visitor

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

      abstract class KindVisitorImplementation implements KindVisitor
      {
      
          /**
           * The fallback implementation for node kinds where the subclass visitor

      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