driftingly / rector-laravel

Rector upgrades rules for Laravel
http://getrector.org
MIT License
540 stars 52 forks source link

Adds the TypeHintTappableCallRector #244

Closed peterfox closed 1 month ago

peterfox commented 1 month ago

Changes

Why

Should be a neat rule to help people automatically type hint the tap method.

-tap($collection, function ($collection) {}
+tap($collection, function (Collection $collection) {}
-(new Collection)->tap(function ($collection) {}
+(new Collection)->tap(function (Collection $collection) {}
peterfox commented 1 month ago

Thank you for catching those @GeniJaho 😄