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

SlevomatCodingStandard.TypeHints.ClassConstantTypeHint SlevomatCodingStandard.TypeHints.PropertyTypeHint SlevomatCodingStandard.TypeHints.ParameterTypeHint >This sniff can cause an error if you're overriding parent property which does not have typehints. In such cases add @phpcsSuppress SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint annotation to the property to...

Enhancement

I see `SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition` for requiring `array|null` over `null|array`. I see `SlevomatCodingStandard.TypeHints.DNFTypeHintFormat` for requiring `?array` over `array|null` in PHP code (not docs).

`SlevomatCodingStandard.Functions.StaticClosure` does not provide a setting to toggle this sniff for only arrow functions or traditional `function` closure syntax. While declaring traditional closures static *might* be a best practice, the...

Enhancement