Skip to content

Simpify Request::is() and Request::fullUrlIs() #41395

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

Closed
wants to merge 1 commit into from

Conversation

sebdesign
Copy link
Contributor

#39857 replaced a foreach loop with a Collection::contains(), but the Str::is() method can already handle an array of patterns to find a single match.

So it makes sense to pass the the variadic arguments directly to this method instead of a foreach loop or a collection method.

@taylorotwell
Copy link
Member

If the code is not broken I don't want to change it.

@sebdesign
Copy link
Contributor Author

It wasn't broken before #39857 either. I'm only suggesting this change because Collection::contains() is redundant here and does not provide anything that Str::is() cannot do.

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