glhd/laravel-faux-generics

Faux generics for better type hinting and refactoring in Laravel projects.

0.4.0 2020-04-23 13:08 UTC

This package is auto-updated.

Last update: 2024-12-23 01:42:20 UTC


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