Download the PHP package symplify/coding-standard without Composer
On this page you can find all versions of the php package symplify/coding-standard. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download symplify/coding-standard
More information about symplify/coding-standard
Files in symplify/coding-standard
Package coding-standard
Short Description Set of Symplify rules for PHP_CodeSniffer and PHP CS Fixer.
License MIT
Informations about the package coding-standard
Coding Standard
[!WARNING] This package is deprecated. Use Easy Coding Standard (ECS) instead, where these rules and coding standard work out of the box—no extra setup needed.
Coding standard rules for clean, consistent, and readable PHP code. No configuration needed—just install and let it handle the rest.
They run best with ECS.
Install
-
Register in
ecs.phpconfig: - And run:
23 Rules to Keep Your Code Clean
ArrayListItemNewlineFixer
Indexed PHP array item has to have one line per item
- class:
Symplify\CodingStandard\Fixer\ArrayNotation\ArrayListItemNewlineFixer
ArrayOpenerAndCloserNewlineFixer
Indexed PHP array opener [ and closer ] must be on own line
- class:
Symplify\CodingStandard\Fixer\ArrayNotation\ArrayOpenerAndCloserNewlineFixer
BlankLineAfterStrictTypesFixer
Strict type declaration has to be followed by empty line
- class:
Symplify\CodingStandard\Fixer\Strict\BlankLineAfterStrictTypesFixer
LineLengthFixer
Array items, method parameters, method call arguments, new arguments should be on same/standalone line to fit line length.
:wrench: configure it!
- class:
Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer
MethodChainingNewlineFixer
Each chain method call must be on own line
- class:
Symplify\CodingStandard\Fixer\Spacing\MethodChainingNewlineFixer
Doc block malform rules
Single-task rules that each fix one kind of @param/@return/@var malform. They are registered together in the docblock set and all handle the @phpstan- and @psalm- prefixed variants of these tags.
AddMissingParamNameFixer
Add a missing variable name to a @param annotation
- class:
Symplify\CodingStandard\Fixer\Commenting\AddMissingParamNameFixer
AddMissingVarNameFixer
Add a missing variable name to an inline @var annotation
- class:
Symplify\CodingStandard\Fixer\Commenting\AddMissingVarNameFixer
DoubleAsteriskInlineVarFixer
Use a double asterisk /** doc block for an inline @var comment
- class:
Symplify\CodingStandard\Fixer\Commenting\DoubleAsteriskInlineVarFixer
FixParamNameTypoFixer
Fix a typo in the @param variable name to match the real argument
- class:
Symplify\CodingStandard\Fixer\Commenting\FixParamNameTypoFixer
RemoveDeadParamFixer
Remove a dead @param line that has only a name and no type
- class:
Symplify\CodingStandard\Fixer\Commenting\RemoveDeadParamFixer
RemoveParamNameReferenceFixer
Remove the reference & from a @param variable name
- class:
Symplify\CodingStandard\Fixer\Commenting\RemoveParamNameReferenceFixer
RemoveSuperfluousReturnNameFixer
Remove a superfluous variable name from a @return annotation
- class:
Symplify\CodingStandard\Fixer\Commenting\RemoveSuperfluousReturnNameFixer
RemoveSuperfluousVarNameFixer
Remove a superfluous variable name from a property @var annotation
- class:
Symplify\CodingStandard\Fixer\Commenting\RemoveSuperfluousVarNameFixer
SingleLineInlineVarDocBlockFixer
Collapse a multi-line inline @var doc block into a single line
- class:
Symplify\CodingStandard\Fixer\Commenting\SingleLineInlineVarDocBlockFixer
SwitchedTypeAndNameFixer
Reorder switched type and variable name in @param/@var annotation
- class:
Symplify\CodingStandard\Fixer\Commenting\SwitchedTypeAndNameFixer
RemovePropertyVariableNameDescriptionFixer
Remove docblock descriptions which duplicate their property name
- class:
Symplify\CodingStandard\Fixer\Annotation\RemovePropertyVariableNameDescriptionFixer
RemoveMethodNameDuplicateDescriptionFixer
Remove docblock descriptions which duplicate their method name
- class:
Symplify\CodingStandard\Fixer\Annotation\RemoveMethodNameDuplicateDescriptionFixer
RemovePHPStormAnnotationFixer
Remove "Created by PhpStorm" annotations
- class:
Symplify\CodingStandard\Fixer\Annotation\RemovePHPStormAnnotationFixer
RemoveUselessDefaultCommentFixer
Remove useless PHPStorm-generated @todo comments, redundant "Class XY" or "gets service" comments etc.
- class:
Symplify\CodingStandard\Fixer\Commenting\RemoveUselessDefaultCommentFixer
It also removes "Class representing XY" comments:
Comments that only repeat the class name are removed:
As well as the default doc block generated by the Doctrine ORM:
SpaceAfterCommaHereNowDocFixer
Add space after nowdoc and heredoc keyword, to prevent bugs on PHP 7.2 and lower, see https://laravel-news.com/flexible-heredoc-and-nowdoc-coming-to-php-7-3
- class:
Symplify\CodingStandard\Fixer\Spacing\SpaceAfterCommaHereNowDocFixer
StandaloneLineConstructorParamFixer
Constructor param should be on a standalone line to ease git diffs on new dependency
- class:
Symplify\CodingStandard\Fixer\Spacing\StandaloneLineConstructorParamFixer
StandaloneLineInMultilineArrayFixer
Indexed arrays must have 1 item per line
- class:
Symplify\CodingStandard\Fixer\ArrayNotation\StandaloneLineInMultilineArrayFixer
StandaloneLinePromotedPropertyFixer
Promoted property should be on standalone line
- class:
Symplify\CodingStandard\Fixer\Spacing\StandaloneLinePromotedPropertyFixer