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
we are using in our projects the "Doctrine Coding Standard". For some reasons we want to declarate private properties and methods with a leading underscore.
I don't get it what we are doing wrong to exclude the "PSR2.Classes.PropertyDeclaration.Underscore" and "PSR2.Classes.MethodDeclaration.Underscore" rules.
54 | ERROR | [ ] Private member variable "pDate" must contain a leading underscore (Squiz.NamingConventions.ValidVariableName.PrivateNoUnderscore)
55 | WARNING | [ ] Property name "$_startDate" should not be prefixed with an underscore to indicate visibility (PSR2.Classes.PropertyDeclaration.Underscore)
Versions (please complete the following information)
Operating System
Mac OS Ventura 13.2.1
PHP version
8.2.7
PHP_CodeSniffer version
PHP_CodeSniffer version 3.8.1 (stable) by Squiz and PHPCSStandards
Standard
Doctrine / Custom
Install type
composer
The text was updated successfully, but these errors were encountered:
in addition there is following error in my phpcs output
1 | ERROR | [ ] An error occurred during processing; checking has been aborted. The error message was: "else" without curly braces is not supported.
| | The error originated in the SlevomatCodingStandard.ControlStructures.EarlyExit sniff on line 401. (Internal.Exception)
As for the error coming from the Slevomat standard: that's not a PHPCS issue, but an issue with the Slevomat standard in combination with your code and the error spells out what is needed to fix it: ""else" without curly braces is not supported."
Hello,
we are using in our projects the "Doctrine Coding Standard". For some reasons we want to declarate private properties and methods with a leading underscore.
I don't get it what we are doing wrong to exclude the "PSR2.Classes.PropertyDeclaration.Underscore" and "PSR2.Classes.MethodDeclaration.Underscore" rules.
Here my ruleset
PHPCS Output
Versions (please complete the following information)
The text was updated successfully, but these errors were encountered: