Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 14, 2025

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() and die() functions SHOULD always be called with parentheses even if no argument is given to clearly distinguish them from an access to a constant named exit or die.

Ref: https://www.php-fig.org/per/coding-style/#47-method-and-function-calls

Includes fixer.
Includes unit tests.
Includes documentation.

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()` and `die()` functions SHOULD always be called with parentheses even if no argument is given to clearly distinguish them from an access to a constant named `exit` or `die`.

Ref: https://www.php-fig.org/per/coding-style/#47-method-and-function-calls

Includes fixer.
Includes unit tests.
Includes documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant