PHPCSExtra
PHPCSExtra copied to clipboard
:sparkles: New `Universal.PHP.RequireExitDieParentheses` sniff
This sniff checks that calls to exit/die use parentheses, even if no argument is given and can be used to address the following rule from PER-CS:
4.7 Method and Function Calls ... The
exit()anddie()functions SHOULD always be called with parentheses even if no argument is given to clearly distinguish them from an access to a constant namedexitordie.
Ref: https://www.php-fig.org/per/coding-style/#47-method-and-function-calls
Includes fixer. Includes unit tests. Includes documentation.