Pint not fixing spaces inside parenthesis
calebdw opened this issue · comments
- Pint Version: 1.1.1
- PHP Version: 8.1.8
Description:
When using the PSR12 preset (or when explicitly setting the no_spaces_inside_parenthesis": true,
rule) the spaces inside the parenthesis are not removed for the below code block.
Steps To Reproduce:
Run pint --preset=psr12 <file>
on the function below.
public function article(int $id)
{
// ...
( new AddRecentlyViewedArticle() )->add($article, auth()->user()->id);
// ...
}
It's
no_spaces_inside_parenthesis
.
Yes, I made a mistake in the spelling of the fixer in the issue. However, this does not change the fact that 1) it is a default in the PSR12 preset:
@psr12
Using the @PSR12 rule set will enable the no_spaces_inside_parenthesis rule.
and that 2) the example shown is not being fixed, either with the PSR12 preset or with the rule explicitly enabled in the pint.json
config.