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.5] Extract to own method #20130

Merged
merged 2 commits into from
Jul 18, 2017
Merged

[5.5] Extract to own method #20130

merged 2 commits into from
Jul 18, 2017

Conversation

themsaid
Copy link
Member

A new method called hasChanges() that isDirty() and wasChanged() calls to avoid repetition.

// Here we will spin through every attribute and see if this is in the array of
// dirty attributes. If it is, we will return true and if we make it through
// all of the attributes for the entire array we will return false at end.
foreach (array_wrap($attributes) as $attribute) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\Illuminate\Support\Arr::wrap ? 😉

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.

None yet

3 participants