Skip to content

[5.6] Fix return docblock for response helper #25147

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
Aug 8, 2018

Conversation

j3j5
Copy link
Contributor

@j3j5 j3j5 commented Aug 8, 2018

Running larastan (a static code analyzer) I got this error

Call to an undefined method Illuminate\Contracts\Routing\ResponseFactory|::header()

on a similar piece of code to this:

response('content')->header("my header")

After some digging I realized the docblock isn't entirely correct since the helper can only return an instance of Illuminate\Contracts\Routing\ResponseFactory when called empty or an instance of Illuminate\Http\Response when given some content, hence the fix for the docblock.

Since it's a change on a docblock and not actual code it shouldn't break anything.

@j3j5 j3j5 changed the title Fix return docblock for response helper [5.6] Fix return docblock for response helper Aug 8, 2018
@taylorotwell taylorotwell merged commit 5a38cb1 into laravel:5.6 Aug 8, 2018
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