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

Add fluent setter and getter for checkAllowedValues #151

Merged
merged 3 commits into from Sep 8, 2017

Conversation

@dakorpar
Copy link
Contributor

dakorpar commented Apr 7, 2017

Sorry for not following template, but I believe everything is preety clear here.
I run into this one on project I'm working on and IMHO checkAllowedValues shouldn't be just field but property with fluent setter. It's also more consistent like that and easier to add.
I wished to set it as private as well but that would be breaking change...

@dg

This comment has been minimized.

Copy link
Member

dg commented Jun 21, 2017

setCheckAllowedValues sounds very strange… ;-)

@dakorpar

This comment has been minimized.

Copy link
Contributor Author

dakorpar commented Jun 21, 2017

any suggestion? I mean variable name is checkAllowedValues, so I just added set before...

@JanTvrdik

This comment has been minimized.

Copy link
Contributor

JanTvrdik commented Jun 22, 2017

How about public function checkAllowedValues(bool $check = TRUE)?

@dg

This comment has been minimized.

Copy link
Member

dg commented Jun 22, 2017

Sounds good. Although it sounds that values are checked by calling that method.

@PavelJurasek

This comment has been minimized.

Copy link

PavelJurasek commented Jun 23, 2017

public function shouldCheckAllowedValues(bool $check = TRUE)

@dakorpar

This comment has been minimized.

Copy link
Contributor Author

dakorpar commented Jun 23, 2017

Better now?

@adaamz

This comment has been minimized.

Copy link
Contributor

adaamz commented Jun 23, 2017

@PavelJurasek I think about the same, but with parameter name $shouldCheck.

@dg dg force-pushed the nette:master branch 4 times, most recently from 8ed13d7 to d6aa86e Jul 13, 2017
@dg dg force-pushed the nette:master branch 8 times, most recently from 1c0b101 to 2e462fb Jul 21, 2017
@dg dg merged commit d05d262 into nette:master Sep 8, 2017
1 check was pending
1 check was pending
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
dg added a commit that referenced this pull request Sep 8, 2017
dg added a commit that referenced this pull request Sep 8, 2017
…cement for $checkAllowedValues (#151)
dg added a commit that referenced this pull request Sep 8, 2017
…cement for $checkAllowedValues (#151)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.