Skip to content

Fix and add missing generic type hints - #17

Merged
DerManoMann merged 1 commit into
mainfrom
fix/generic-typehints
May 25, 2026
Merged

Fix and add missing generic type hints#17
DerManoMann merged 1 commit into
mainfrom
fix/generic-typehints

Conversation

@DerManoMann

Copy link
Copy Markdown
Owner

Summary

  • Add @template/@param/@return annotations to ExplicitType::getBuiltinType() and TypeFactoryTrait::explicit() for proper generic propagation
  • Narrow explicit() parameter from TypeIdentifier|string to TypeIdentifier (all callers already pass enum values)
  • Add missing return type ?BaseType to ResolverExtrasTrait::reduceToBuiltinType()
  • Use list<BaseType> instead of array<BaseType> for ordered collections
  • Add void return types and iterable PHPDoc to test methods

Test plan

  • All 271 PHPUnit tests pass
  • PHPStan at configured level 5 reports no errors

🤖 Generated with Claude Code

- Add @template/@param/@return annotations to ExplicitType::getBuiltinType() and TypeFactoryTrait::explicit()
- Narrow explicit() parameter from TypeIdentifier|string to TypeIdentifier
- Add return type to ResolverExtrasTrait::reduceToBuiltinType()
- Use list<> instead of array<> for ordered collections
- Add void return types and iterable PHPDoc to test methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@DerManoMann
DerManoMann merged commit 94053b2 into main May 25, 2026
6 checks passed
@DerManoMann
DerManoMann deleted the fix/generic-typehints branch May 25, 2026 02:44
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.

1 participant