Php rule accroding to PSR for open curly bracket

Hi, I’m using 7.9.1 version of sonarqube community edition.

I have made a customized profile for PHP to analyze a project and there is this rule “An open curly brace should be located at the end of a line”, this rule according to PSR only applicable for conditional statements but it is showing errors with functions and classes as well. I only want it to check for conditional statements and ignore it for functions and classes. Any help regarding this would be very appreciated. Thanks.

Hello @Wahaj_Muhammad ,

Thanks for reaching out to us. It seems that you have added the rule RSPEC-1105 to your profile. This rule does not conform to the PSR-2 standard and you should remove it from your profile.
Use RSPEC-1808 instead to cover more PSR-2 rules.

Cheers,
Nils

2 Likes

Thank you so much @Nils_Werner that resolves my query.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.