src/Primitive/ListtCons.php
The class ListtCons has 14 public methods. Consider refactoring ListtCons to keep number of public methods under 10. Open
Open
class ListtCons implements Listt, \IteratorAggregate
{
public const of = 'Widmogrod\Primitive\ListtCons::of';
/**
- 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
Avoid unused local variables such as '$head'. Open
Open
[$head, $tail] = $this->headTail();
- Read upRead up
- Exclude checks
UnusedLocalVariable
Since: 0.2
Detects when a local variable is declared and/or assigned, but not used.
Example
class Foo {
public function doSomething()
{
$i = 5; // Unused
}
}