Open alexjonser opened 9 months ago
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)
"config" : {
"vendor-dir" : "Vendor",
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"require-dev": {
"doctrine/coding-standard" : "*"
}
Please don't open issues in this repo anymore. This repo is abandoned and https://github.com/PHPCSStandards/PHP_CodeSniffer is its successor. See: #3932
If the original issue is is still an issue, please open a ticket in the new repo and include a PHP code sample to reproduce the behaviour.
One thing I can already see is a typo:
- <exclude name="PSR2.Classes.MethodDeclaration.Underscore" />
+ <exclude name="PSR2.Methods.MethodDeclaration.Underscore" />
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)