coding-standard
coding-standard copied to clipboard
The coding standard of the Doctrine project.
I tried to improve the test case scenarios that you have. I found a couple of bugs also.. Will report them upstream.. In the meantime you might be interested in...
Until now the SuperfluousExceptionNaming sniff was enabled in Doctrine Coding Standard, but every of our projects disabled this sniff in their local phpcs.xml rule. Doctrine does not actually follow this...
I think these rules are the same. - [PSR12.Properties.ConstantVisibility](https://github.com/squizlabs/PHP_CodeSniffer/blob/master/src/Standards/PSR12/Sniffs/Properties/ConstantVisibilitySniff.php) (Included in PSR12) - [SlevomatCodingStandard.Classes.ClassConstantVisibility](https://github.com/slevomat/coding-standard#slevomatcodingstandardclassesclassconstantvisibility-) If it is correct ```xml ```
Why my phpcs print : "phpcs: ERROR: Referenced sniff "SlevomatCodingStandard.Arrays.SingleLineArrayWhitespace" does not exist Run "phpcs --help" for usage information" my errors when configured phpcs or error in the package?
Hi... I recently opened this #199 Instead of going wild and opening one by one a PR I thought about initiating a discussion here. I believe there are more functions...
[The settings is](https://github.com/slevomat/coding-standard/blob/f32937dc41b587f3500efed1dbca2f82aa519373/SlevomatCodingStandard/Sniffs/Classes/AbstractPropertyAndConstantSpacing.php): ```php $minLinesCountBeforeWithComment = 1; $maxLinesCountBeforeWithComment = 1; $minLinesCountBeforeWithoutComment = 0; $maxLinesCountBeforeWithoutComment = 1; ```
As per https://getcomposer.org/doc/04-schema.md#keywords by including "static analysis" as a keyword in the `composer.json` file, Composer 2.4.0-RC1 and later will prompt users if the package is installed with `composer require` instead...
I do not believe that the coding standard should enforce the usage of union types over the nullable ones. From the original discussion in https://github.com/doctrine/orm/pull/9886#discussion_r917306253: > Personally, I believe arbitrary...
I would like to start discussion on adding these rules to doctrine CS: ```xml tests/* ``` I got this idea when checking https://github.com/doctrine/orm/pull/10126/files#diff-71c09c517db3322ed613e4cdf6cd41ea2323bf44c1677d3c249dd83da4fbeb25R29-R30 The main argument for this change is...