coding-standard icon indicating copy to clipboard operation
coding-standard copied to clipboard

Slevomat Coding Standard for PHP_CodeSniffer provides many useful sniffs

Results 133 coding-standard issues
Sort by recently updated
recently updated
newest added

It would be good if unused variables and parameters sniffs supported a whitelist of names, because PHPCS suppression is not granular enough to always flag only the variables that are...

Hello, here is [question on twitter](https://twitter.com/BackEndTea/status/1174207385507893249) `Should (private) methods that don't use the object instance be static?` I didn't find sniff, whitch to do it. Do you have plan to...

Enhancement

I have some trouble configuring spacing around T_BREAK. Consider the following code as valid: ```php

for example in laravel there have controller directory. class in subdirectory of "Http/Controller" directory or under of "Http/Controller" directory should end with "Controller" postfix. class in subdirectory of "Http/Request" directory...

This was previously reported in #202 and #221. An example from Doctrine MongoDB ODM: ``` /** * Factory for returning new PersistenceBuilder instances used for preparing data into * queries...

Enhancement

Request for a sniff similar to Commenting.ForbiddenComments, but for @param & @return description @see https://github.com/slevomat/coding-standard/issues/885

Enhancement

For PHP 5 similar code exists: ```php call_user_func(function () { ... }); ``` This should be: ```php (function () { ... })(); ```

Enhancement

Having an app within `My\App` namespace, I'd like to only allow throwing exceptions from `My\App` or any sub-namespace - no SPL, no global Exception/Error. This should be really straightforward, but...

Investigating

This sniff would compare to `SlevomatCodingStandard.Arrays.TrailingArrayCommaSniff` and require a trailing comma on each line of a multi-line annotation. The idea is to reduce the diff size when adding a new...

Enhancement

Hello, how hard would be extending ForbiddenAnnotations sniff to allow search for annotations not only by name by also by parameters. I would like to find/remove all instances of `@SuppressWarnings(UnusedFormalParameter)`...

Enhancement