src/Phan/AST/Visitor/FlagVisitorImplementation.php
FlagVisitorImplementation
has 74 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class FlagVisitorImplementation implements FlagVisitor
{
/**
* This is called to analyze nodes in FlagVisitorImplementation subclasses
The class FlagVisitorImplementation has 74 non-getter- and setter-methods. Consider refactoring FlagVisitorImplementation to keep number of methods under 25. Open
Open
abstract class FlagVisitorImplementation implements FlagVisitor
{
/**
* This is called to analyze nodes in FlagVisitorImplementation subclasses
- Read upRead up
- Exclude checks
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
Open
abstract class FlagVisitorImplementation implements FlagVisitor
{
/**
* This is called to analyze nodes in FlagVisitorImplementation subclasses
- Read upRead up
- Exclude checks
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
Open
abstract class FlagVisitorImplementation implements FlagVisitor
{
/**
* This is called to analyze nodes in FlagVisitorImplementation subclasses
- Exclude checks
File FlagVisitorImplementation.php
has 300 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
declare(strict_types=1);
namespace Phan\AST\Visitor;
The class FlagVisitorImplementation has 74 public methods and attributes. Consider reducing the number of public items to less than 45. Open
Open
abstract class FlagVisitorImplementation implements FlagVisitor
{
/**
* This is called to analyze nodes in FlagVisitorImplementation subclasses
- Read upRead up
- Exclude checks
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 ...]
}