Skip to content

Conversation

@Morgy93
Copy link
Collaborator

@Morgy93 Morgy93 commented Jan 30, 2026

This pull request improves type safety and documentation across the codebase by adding and refining array type annotations in PHPDoc comments. It also updates the static analysis configuration to enforce stricter checks. These changes help clarify expected data structures, reduce ambiguity, and make the code easier to maintain and understand.

Type annotation improvements (most files):

  • Added or updated array type annotations in PHPDoc comments throughout the codebase, specifying key and value types for arrays such as array<string, mixed>, array<int, string>, and similar, in method signatures and class properties for better type safety and IDE/static analysis support. [1] [2] [3] [4] [5] [6] [7] [8]

  • Improved function and method documentation to specify array return and parameter types, e.g., @return array<string, mixed>, @param array<string>, and similar, making expectations clearer for developers and static analysis tools. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21]

Static analysis configuration:

  • Increased PHPStan static analysis level from 5 to 6 in phpstan.neon for stricter type checking and improved code quality enforcement.

Constructor and property documentation:

  • Added constructor parameter documentation and property annotations for classes to clarify expected types, especially for arrays and injected dependencies. [1] [2] [3] [4]

These changes collectively enhance code reliability and maintainability by making type expectations explicit and leveraging stricter static analysis.

@Morgy93 Morgy93 merged commit 0a4a5fa into main Jan 30, 2026
12 checks passed
@Morgy93 Morgy93 deleted the fix-phpstan-6 branch January 30, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants