Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the TypeHintTappableCallRector #244

Merged
merged 4 commits into from
Aug 31, 2024
Merged

Conversation

peterfox
Copy link
Collaborator

Changes

  • Adds the new TypeHintTappableCallRector rule
  • Adds tests for the rules
  • Adds a stub for the Tappable trait

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 peterfox added the enhancement New feature or request label Aug 27, 2024
@peterfox peterfox self-assigned this Aug 27, 2024
@peterfox peterfox requested a review from GeniJaho August 31, 2024 13:18
@peterfox
Copy link
Collaborator Author

Thank you for catching those @GeniJaho 😄

@GeniJaho GeniJaho merged commit ca45e6d into main Aug 31, 2024
5 checks passed
@GeniJaho GeniJaho deleted the feature/tappable-type-hinting branch August 31, 2024 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants