You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
---------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------------------------
267 | WARNING | Empty set of arbitrary parentheses found.
| | (Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty)
---------------------------------------------------------------------------------------------------------------------
Code sample
publicfunctiongeneralize(GeneralizePrecision$precision): Type
{
returnnewparent();
}
gsherwood
changed the title
return new parent() is reported by Generic.WhiteSpace.ArbitraryParenthesesSpacing.FoundEmpty
Generic.WhiteSpace.ArbitraryParenthesesSpacing false positive for return new parent()
Jun 27, 2022
Describe the bug
When doing
return new parent()
, the code reports:Code sample
Custom ruleset
https://github.com/phpstan/phpstan-src/blob/adf7313ac266ef217cf144fc4901a2998ead4df2/phpcs.xml
Expected behavior
No error should be reported. New with parentheses is required by SlevomatCodingStandard.ControlStructures.NewWithParentheses.MissingParentheses.
Versions (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: