Skip to content

Add fluent setter and getter for checkAllowedValues - #151

Merged
dg merged 3 commits into
nette:masterfrom
dakorpar:set-allowed-values-fluend
Sep 8, 2017
Merged

Add fluent setter and getter for checkAllowedValues#151
dg merged 3 commits into
nette:masterfrom
dakorpar:set-allowed-values-fluend

Conversation

@dakorpar

@dakorpar dakorpar commented Apr 7, 2017

Copy link
Copy Markdown
Contributor

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

dg commented Jun 21, 2017

Copy link
Copy Markdown
Member

setCheckAllowedValues sounds very strange… ;-)

@dakorpar

Copy link
Copy Markdown
Contributor Author

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

@JanTvrdik

Copy link
Copy Markdown
Contributor

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

@dg

dg commented Jun 22, 2017

Copy link
Copy Markdown
Member

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

@PavelJurasek

Copy link
Copy Markdown

public function shouldCheckAllowedValues(bool $check = TRUE)

@dakorpar

Copy link
Copy Markdown
Contributor Author

Better now?

@adaamz

adaamz commented Jun 23, 2017

Copy link
Copy Markdown
Contributor

@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 July 14, 2017 10:58
@dg
dg force-pushed the master branch 8 times, most recently from 1c0b101 to 2e462fb Compare July 24, 2017 17:34
@dg
dg merged commit d05d262 into nette:master Sep 8, 2017
dg pushed a commit that referenced this pull request Sep 8, 2017
dg pushed a commit that referenced this pull request Sep 8, 2017
dg pushed a commit that referenced this pull request Sep 8, 2017
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.

5 participants