Skip to content

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