Skip to content

[MAINTENANCE] Check whole code with PHPStan and fix reported issues #1538

@stweil

Description

@stweil

Description

PHPStan is used in a GitHub action CI test, but this test is currently configured to suppress some error messages.

Reproduction

Run PHPStan without excluding some issues and files:

vendor/bin/phpstan analyze --level=5 Classes

This will report 184 errors. With --level=6 even 692 errors are reported, and higher level further increase the number of reported errors up to 1403 errors with --level=9.

Expected Behavior

Suppressing PHPStan errors in the code (currently used 17 times) or in .github/phpstan.neon should only be used as an intermediate solution.

Ideally PHPStan errors should not be suppressed but analyzed and fixed.

Examples of errors which can be fixed:

Metadata

Metadata

Assignees

No one assigned

    Labels

    ⟳ maintenanceA task to keep the code up-to-date and manageable.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions