Skip to content

PHPStan Level 6 Compliance #431

Description

@armanist

Description
Upgrade the entire codebase to pass PHPStan level 6 static analysis with zero errors. Level 6 enforces strict typing on all parameters, return values, properties, and iterable value types — catching type mismatches that can cause runtime TypeError exceptions.

Motivation
PHPStan level 6 ensures that every array has its value type specified, every method has explicit parameter and return types, and template/generic types resolve correctly. This eliminates an entire class of runtime errors and makes the codebase safer for contributors to refactor with confidence.

Scope
The following packages and files require type annotation changes (docblocks only — no runtime behavior changes unless a genuine bug is found):

Acceptance Criteria

  • vendor/bin/phpstan analyse --level 6 exits with 0 errors
  • vendor/bin/phpunit — full suite passes with 0 failures
  • No runtime PHP code changes except for the four bug fixes listed above
  • All existing tests continue to pass without modification

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Fields

No fields configured for Task.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions