Skip to content

[9.x] Added type to closure #7856

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

Merged
merged 1 commit into from
Apr 4, 2022
Merged

Conversation

ash-jc-allen
Copy link
Contributor

Hey! This PR is only a really small one and just adds a typehint and 'use statement' to a code example.

When I was writing some tests today I needed to use the Http::fake() that allows you to define the response in a closure. I wasn't 100% sure what type $request would be straight away, but managed to figure out what it'd be by looking at the other examples on the page.

So, I just thought I'd propose adding the typehint to this example to make it a bit easier to tell what type $request is :)

@taylorotwell taylorotwell merged commit bb7cd7c into laravel:9.x Apr 4, 2022
@ash-jc-allen ash-jc-allen deleted the add-request-type branch April 4, 2022 21:19
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.

2 participants