Are parentheses required in PSR-2 PHP ternary syntax?
问题 Question: are parentheses required in PSR-2 PHP ternary syntax? Looking for which (if either) of the following ternary statement's syntax is compliant with PSR-2 - I also need to be pointed to documentation or some authority link: $error = ($error_status) ? 'Error' : 'No Error'; OR $error = $error_status ? 'Error' : 'No Error'; Note: php.net it shows the syntax with the parentheses, but I could not find this in any of the 'official PSR-2' docs. Conclusion If there is no PSR-2 standard on this