-
Notifications
You must be signed in to change notification settings - Fork 11
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
NEW: Code cleanup (tests, linting). #54
Conversation
52c6bef
to
c9f8cc9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just commenting as I didn't test it locally. It looks to be 99% linting/format updates or adding explicit table names which are all good. I've left a couple of comments.
src/Snapshot.php
Outdated
'ObjectHash' => $this->OriginHash, | ||
])->first(); | ||
$item = $this->Items() | ||
->filter([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this be a find
call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, good find 👍 , I'll make the change.
} | ||
|
||
/** | ||
* @return RelationDiffer[] | ||
* @todo Memoise / cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] memoise is a thing: https://en.wikipedia.org/wiki/Memoization
{ | ||
list($a1, $a2, $a1Block1, $a1Block2, $a2Block1, $gallery1, $gallery2) = $this->buildState(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it necessary to destructure all the array items even thought you only use $a1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left this intact but I might need to clean this one up as well.
NEW: Code cleanup (tests, linting).
Out of scope of this PR
These will be covered separate change-sets
Related issues
#51