You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Looks like whitespace around ternary operators is currently not checked.
Should it be ?
Upstream this has been added to the WhiteSpace.OperatorSpacing sniff. The WPCS version of this sniff has not been synced with upstream for quite a long time.
Might be worth checking if the WP version can be removed and defer to the upstream version instead.
$a = ($a > 10)?$a:10;
will yield no errors.
I would expect this to error on:
no whitespace before "inline then" / ? - expected 1 space
no whitespace after "inline then" / ? - expected 1 space
no whitespace before "inline else" / : - expected 1 space
no whitespace after "inline else" / : - expected 1 space
As a side-note, I'm also missing these notifications:
no whitespace after the open parenthesis
no whitespace before the closing parenthesis
The text was updated successfully, but these errors were encountered:
Looks like whitespace around ternary operators is currently not checked.
Should it be ?
Upstream this has been added to the
WhiteSpace.OperatorSpacing
sniff. The WPCS version of this sniff has not been synced with upstream for quite a long time.Might be worth checking if the WP version can be removed and defer to the upstream version instead.
will yield no errors.
I would expect this to error on:
As a side-note, I'm also missing these notifications:
The text was updated successfully, but these errors were encountered: