Skip to content

Conversation

@f3l1x
Copy link
Member

@f3l1x f3l1x commented Dec 28, 2025

No description provided.

- Update PHPStan level from 8 to 9 (strictest)
- Add type-safe helper methods in Helpers class for array access
- Update all Schema classes to use type-safe helpers
- Update README.md to match template (heatbadger URL, badges, versions table)
- Update LICENSE year to 2025
- Update GitHub workflow cron schedules to match template
- Convert all Schema test files from TestCase to Toolkit::test() pattern
- Use .phpt extension as per Contributte standards
/**
* @param mixed[] $data
*/
public static function fromArray(array $data): Contact
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add proper phpdoc with array shape

*/
public static function fromArray(array $data): self
{
$encoding = new Encoding();
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add proper array shape phpdoc

- Remove type-safe accessor methods from Helpers class (getString, getStringOrNull, etc.)
- Keep only the merge() utility function in Helpers
- Add inline @var annotations in Schema classes for PHPStan level 9 compatibility
- Remove Helpers imports from Schema files that no longer need it
Replace generic mixed[] type annotations with specific array shape
phpdocs on all Schema::fromArray() methods. This provides better
IDE support and type safety for PHPStan level 9.

Array shapes specify the exact structure expected by each fromArray()
method, including required and optional keys with their types.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants