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
When using ternary can we have a check that will see if the ternary is needed or not? ESLint uses this rule. This would be thrown when we want to store boolean in a variable. For instance
<?php$var = 'a';
// Example of an unneeded ternary:$bla = $var === 'a' ? true : false;
// Can be written as:$bla = $var === 'a';
Don't know if we have this or not (since I'm not getting warnings I'm guessing we don't have it).
When using ternary can we have a check that will see if the ternary is needed or not? ESLint uses this rule. This would be thrown when we want to store boolean in a variable. For instance
Don't know if we have this or not (since I'm not getting warnings I'm guessing we don't have it).
Also, I've stumbled into this: https://www.drupal.org/project/drupal/issues/1838368
Would this be useful to have as a rule?
The text was updated successfully, but these errors were encountered: