format/operators/new-parentheses
In the format-laravel and format-psr12 presets. Safe fix.
What it does
All instances created with new keyword must (not) be followed by parentheses.
Configuration
[format.rules]
"operators/new-parentheses" = true
To skip it in some files, add a @pun-ignore-file comment.
Options
| Name | Type | Allowed values | Default | Upstream name |
|---|---|---|---|---|
anonymous-class |
bool |
Any | true |
anonymous_class |
named-class |
bool |
Any | true |
named_class |
Replaces
new_with_parentheses(php-cs-fixer)