v6.0.0
This new major release brings in some new default rules:
- disallowed
Abstract
,Trait
,Exception
,Interface
prefixes along with suffixes - forbid multiple lines between declared functions
- disallow
/** class Foo */
forclass Foo
comments (some editors add it by default, and it is not useful) - disallow PHPStorm/IntelliJ default file header including author name
- forbid duplicate variable assignments, such as
$foo = $foo = bar()
- enforce spacing between the type declaration and the variadic declaration of a function parameter:
function (int $foo)
- forbid late static binding for constants:
$foo::BAR
is now a violation - require an empty line before a
return
statement when not directly within a flow control construct - intersection and generic types support, thanks to Slevomat CS 5
Total issues resolved: 19
- 38: Forbid
Abstract
,Exception
andInterface
prefixing too thanks to @greg0ire - 52: Exclude Squiz.Commenting.FunctionComment.ThrowsNotCapital sniff thanks to @deeky666
- 90: CI: Test against PHP 7.3 thanks to @Majkl578
- 94: Add test script to make it easier to run the tests thanks to @carusogabriel
- 95: Add sniff to forbid multiple lines between functions thanks to @carusogabriel
- 96: Link to Slack instead of Gitter thanks to @greg0ire
- 97: Disallow "Class <name>" as class comment thanks to @linaori
- 98: Remove IDEA/Phpstorm default file template properly thanks to @ostrolucky
- 99: Update to PHPCS 3.4 and use new Sniffs thanks to @carusogabriel
- 101: Use Ubuntu 16.04 thanks to @carusogabriel
- 104: Forbid duplicated variables assignments thanks to @carusogabriel
- 105: Add rule to force simplification of returns thanks to @carusogabriel
- 108: Make all annotations useful by default thanks to @Majkl578
- 109: Upgrade to Slevomat CS 5.0 thanks to @Majkl578
- 111: Enable SpreadOperatorSpacing sniff thanks to @Majkl578
- 112: Forbid LSB for constants thanks to @Majkl578
- 114: Forbid "Trait" suffix thanks to @Majkl578
- 115: Trigger CI failure when phpcbf cannot fix the file thanks to @ostrolucky
- 120: Require newline before return thanks to @ostrolucky