-
Notifications
You must be signed in to change notification settings - Fork 46
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
Refactor references NS to use consistent and explicit variable and method names #675
Conversation
0faf920
to
47c3d37
Compare
47c3d37
to
b985e52
Compare
src/Reference/ContainsOne.php
Outdated
|
||
return $p; | ||
return new Persistence\ArrayOfStrings([$this->getTableAlias() => $row ? [1 => $row] : []]); |
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.
why not 20? Isn't this ID?
src/Reference/HasMany.php
Outdated
$ourModel = $this->getOurModel(); | ||
|
||
return $this->getTheirModel($defaults)->addCondition( | ||
$this->their_field ?: ($ourModel->table . '_' . ($ourModel->id_field ?: 'id')), |
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.
we should have more like two protected methods for build and parse (I think related with table alias regexes above)
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.
Also here - feel free to implement your ideas in this PR
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.
related with #675 (comment) , this should be probably solved in this PR
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.
This PR is about pure renaming. Let's merge this PR and you look into it when you have time and willingness for it.
b2c69db
to
5196ace
Compare
8ceefb5
to
e2121cb
Compare
@mvorisek let's merge this now as pure var name refactoring. |
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.
Very good work on making code more readable. Especially their/our model. That was always a pain to not mix these two.
Related to solving #662