Skip to content

Conversation

@JanMikes
Copy link
Contributor

Fixes #234

? rtrim($rule->control->translate($rule->control->getCaption()), ':')
: null;
case 'label':
if ($rule->control instanceof Controls\BaseControl) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this way (replacing ternary operator with if with early return) is more readable intead of having 2 nested ternary operators, but i am opened to adapt it to desired codestyle needs - there is missing some coding standard tool to force code style :-).

@dg
Copy link
Member

dg commented Nov 18, 2019

Thanks

@dg dg merged commit 1bf3cbb into nette:master Nov 18, 2019
dg pushed a commit that referenced this pull request Nov 18, 2019
dg pushed a commit that referenced this pull request Nov 18, 2019
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.

Using Nette\Utils\Html as label with validation causes: rtrim() expects parameter 1 to be string, object given

2 participants