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 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
Copy link
Member

@dg dg commented Jun 21, 2017

setCheckAllowedValues sounds very strange… ;-)

@dakorpar
Copy link
Contributor Author

@dakorpar dakorpar commented Jun 21, 2017

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

@JanTvrdik
Copy link
Contributor

@JanTvrdik JanTvrdik commented Jun 22, 2017

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

@dg
Copy link
Member

@dg dg commented Jun 22, 2017

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

@PavelJurasek
Copy link

@PavelJurasek PavelJurasek commented Jun 23, 2017

public function shouldCheckAllowedValues(bool $check = TRUE)

@dakorpar
Copy link
Contributor Author

@dakorpar dakorpar commented Jun 23, 2017

Better now?

@adaamz
Copy link
Contributor

@adaamz adaamz commented Jun 23, 2017

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

@dg dg force-pushed the master branch 4 times, most recently from 8ed13d7 to d6aa86e Compare Jul 14, 2017
@dg dg force-pushed the master branch 8 times, most recently from 1c0b101 to 2e462fb Compare Jul 24, 2017
@dg dg merged commit d05d262 into nette:master Sep 8, 2017
1 check was pending
dg pushed a commit that referenced this issue Sep 8, 2017
dg pushed a commit that referenced this issue Sep 8, 2017
dg pushed a commit that referenced this issue Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants