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

[5.4] Convert object rules to string only once. #18141

Merged
merged 2 commits into from
Feb 27, 2017
Merged

[5.4] Convert object rules to string only once. #18141

merged 2 commits into from
Feb 27, 2017

Conversation

themsaid
Copy link
Member

Currently if you have this rule definition 'required|'.Rule::in([1,2]), __toString of Illuminate\Validation\Rules\In will be called only once, however in the following two cases the method will be called over 20 times in the second case and 8 times in the first case.

  • Rule::in([1,2])
  • ['required', Rule::in([1,2])]

This PR converts these object rules to string once in the parser so that we don't have to do it again.

@themsaid themsaid closed this Feb 27, 2017
@themsaid themsaid reopened this Feb 27, 2017
@themsaid themsaid closed this Feb 27, 2017
@themsaid themsaid reopened this Feb 27, 2017
@themsaid
Copy link
Member Author

Not sure what's wrong with StyleCI

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