src/Phan/AST/Visitor/FlagVisitorImplementation.php

Summary

Maintainability
D
1 day
Test Coverage

FlagVisitorImplementation has 74 functions (exceeds 20 allowed). Consider refactoring.
Open

abstract class FlagVisitorImplementation implements FlagVisitor
{

    /**
     * This is called to analyze nodes in FlagVisitorImplementation subclasses
Severity: Major
Found in src/Phan/AST/Visitor/FlagVisitorImplementation.php - About 1 day to fix

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

    abstract class FlagVisitorImplementation implements FlagVisitor
    {
    
        /**
         * This is called to analyze nodes in FlagVisitorImplementation subclasses

    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 FlagVisitorImplementation has 74 public methods. Consider refactoring FlagVisitorImplementation to keep number of public methods under 10.
    Open

    abstract class FlagVisitorImplementation implements FlagVisitor
    {
    
        /**
         * This is called to analyze nodes in FlagVisitorImplementation subclasses

    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 FlagVisitorImplementation has an overall complexity of 74 which is very high. The configured complexity threshold is 50.
    Open

    abstract class FlagVisitorImplementation implements FlagVisitor
    {
    
        /**
         * This is called to analyze nodes in FlagVisitorImplementation subclasses

    File FlagVisitorImplementation.php has 300 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/FlagVisitorImplementation.php - About 3 hrs to fix

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

      abstract class FlagVisitorImplementation implements FlagVisitor
      {
      
          /**
           * This is called to analyze nodes in FlagVisitorImplementation subclasses

      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