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

[11.x] feat: add more specific types and tests for helpers #51938

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

calebdw
Copy link
Contributor

@calebdw calebdw commented Jun 27, 2024

Hello!

This PR adds more specific/accurate return types to the helpers based on the function arguments.

Note that I had to change the cache definition from cache(...$args) to cache($key = null, $default = null) as the variadic parameter didn't play nice with the conditional return, this is also more consistent with other function that accept a key/default.

Thanks!

@calebdw calebdw marked this pull request as draft June 27, 2024 20:40
@calebdw calebdw force-pushed the helpers branch 2 times, most recently from e7dc315 to 577db83 Compare June 28, 2024 03:39
@calebdw calebdw marked this pull request as ready for review June 28, 2024 03:52
@calebdw calebdw changed the title feat: add more specific types and tests for helpers [11.x] feat: add more specific types and tests for helpers Jun 28, 2024
@taylorotwell taylorotwell merged commit 5d006a5 into laravel:11.x Jun 28, 2024
28 checks passed
@calebdw
Copy link
Contributor Author

calebdw commented Jun 28, 2024

Thanks @taylorotwell!

@calebdw calebdw deleted the helpers branch June 28, 2024 20:15
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.

None yet

2 participants