widmogrod/php-functional

View on GitHub
src/Primitive/ListtCons.php

Summary

Maintainability
A
0 mins
Test Coverage
A
98%

The class ListtCons has 14 public methods. Consider refactoring ListtCons to keep number of public methods under 10.
Open

class ListtCons implements Listt, \IteratorAggregate
{
    public const of = 'Widmogrod\Primitive\ListtCons::of';

    /**
Severity: Minor
Found in src/Primitive/ListtCons.php by phpmd

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

        [$head, $tail] = $this->headTail();
Severity: Minor
Found in src/Primitive/ListtCons.php by phpmd

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
    }
}

Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

There are no issues that match your filters.

Category
Status