src/Phan/AST/Visitor/KindVisitorImplementation.php
KindVisitorImplementation
has 107 functions (exceeds 20 allowed). Consider refactoring. Open
Open
abstract class KindVisitorImplementation implements KindVisitor
{
/**
* The fallback implementation for node kinds where the subclass visitor
File KindVisitorImplementation.php
has 437 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
<?php
declare(strict_types=1);
namespace Phan\AST\Visitor;
The class KindVisitorImplementation has 107 non-getter- and setter-methods. Consider refactoring KindVisitorImplementation to keep number of methods under 25. Open
Open
abstract class KindVisitorImplementation implements KindVisitor
{
/**
* The fallback implementation for node kinds where the subclass visitor
- 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 KindVisitorImplementation has 107 public methods. Consider refactoring KindVisitorImplementation to keep number of public methods under 10. Open
Open
abstract class KindVisitorImplementation implements KindVisitor
{
/**
* The fallback implementation for node kinds where the subclass visitor
- 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 KindVisitorImplementation has an overall complexity of 107 which is very high. The configured complexity threshold is 50. Open
Open
abstract class KindVisitorImplementation implements KindVisitor
{
/**
* The fallback implementation for node kinds where the subclass visitor
- Exclude checks
The class KindVisitorImplementation has 107 public methods and attributes. Consider reducing the number of public items to less than 45. Open
Open
abstract class KindVisitorImplementation implements KindVisitor
{
/**
* The fallback implementation for node kinds where the subclass visitor
- 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 ...]
}