glhd / laravel-faux-generics
Faux generics for better type hinting and refactoring in Laravel projects.
0.4.0
2020-04-23 13:08 UTC
Requires
- php: >=7.3
- illuminate/support: 5.8.*|^6.0|^7.0
Requires (Dev)
- barryvdh/reflection-docblock: ^2.0
- mockery/mockery: ^1.1
- orchestra/testbench: ~3.0
- php-coveralls/php-coveralls: ^2.1
- phpunit/phpunit: ^7.3
README
This package lets you generate Laravel-specific helper files to simulate generics in PHP. This provides better type hinting and refactoring for many of Laravel's fluent and proxy features:
- Models (return types and static methods)
- Query Builder (return types, pass-thru, and forward calls)
- Collections (return types)
- Higher Order Collection Proxies (type-hint on property and method chains)
- Model Scopes (type-hint on builder, relations, etc)
- Factories (type-hint on
factory()
calls) - Paginator
- Macros