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

[4.x] Remove AuthenticateSession::handle return type #534

Closed
wants to merge 4 commits into from

Conversation

stevebauman
Copy link

This PR removes the enforced return type on the AuthenticateSession::handle method. This may have accidentally slipped in from a PR or something.

@taylorotwell
Copy link
Member

@stevebauman what else could the return type be?

@stevebauman
Copy link
Author

@taylorotwell Nothing, but the other middleware in this package don't have types:

public function handle($request, $next, ...$abilities)

public function handle($request, $next, ...$abilities)

public function handle($request, $next, ...$scopes)

public function handle($request, $next, ...$scopes)

public function handle($request, $next)

Was pushing this just for consistency sake 🙏

Do you have a rule for when a type-hint/return type should or shouldn't be used so I know for the future?

@taylorotwell
Copy link
Member

Got it - I think if it's OK I'll just leave it for now since it shouldn't be possible to return anything else. Just wouldn't want to break anything extending it or whatever.

@stevebauman
Copy link
Author

Ok sounds good! Appreciate the reply 🙏

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