AJenbo/agcms

View on GitHub
application/inc/DTO/InvoiceFilter.php

Summary

Maintainability
A
0 mins
Test Coverage
F
0%

The method __construct has 10 parameters. Consider reducing the number of parameters to less than 10.
Open

    public function __construct(
        public readonly ?int $id,
        public readonly int $year,
        public readonly int $month,
        public readonly string $department,
Severity: Minor
Found in application/inc/DTO/InvoiceFilter.php by phpmd

Avoid variables with short names like $id. Configured minimum length is 3.
Open

        public readonly ?int $id,
Severity: Minor
Found in application/inc/DTO/InvoiceFilter.php by phpmd

ShortVariable

Since: 0.2

Detects when a field, local, or parameter has a very short name.

Example

class Something {
    private $q = 15; // VIOLATION - Field
    public static function main( array $as ) { // VIOLATION - Formal
        $r = 20 + $this->q; // VIOLATION - Local
        for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
            $r += $this->q;
        }
    }
}

Source https://phpmd.org/rules/naming.html#shortvariable

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly ?int $id,

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly ?string $momssats,

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly string $clerk,

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly string $tlf,

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly int $month,

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly string $department,

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly string $status,

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly string $name,

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly string $email,

Line indented incorrectly; expected 4 spaces, found 8
Open

        public readonly int $year,

There are no issues that match your filters.

Category
Status