youdot / coding-standard
The coding standard applying to all Youdot PHP projects, based on Doctrine set of PHPCS rules, with additional checks.
Installs: 9 033
Dependents: 10
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 1
Type:phpcodesniffer-standard
Requires
- doctrine/coding-standard: ^8.0
- phpstan/phpdoc-parser: >=0.4.4
Requires (Dev)
- phpstan/phpstan: ^0.12.59
- phpunit/phpunit: ^9.5.0
README
The Youdot Coding Standard is set of PHP_CodeSniffer rules applied to all Youdot projects. Youdot Coding Standard is heavily based on Doctrine Coding Standard.
Install
composer require youdot/coding-standard --dev
Usage
<!-- Include full Youdot Coding Standard --> <rule ref="Youdot"/> <!-- Or include full Youdot Coding Standard for Symfony--> <rule ref="YoudotSymfony"/>
Additional Sniffs
- SnakeCase Variable
- Modifier Letter Apostrophe Character
- Immutable classes through Psalm
To disable them:
<rule ref="Youdot"> <exclude name="Youdot.NamingConventions.ValidVariableName"/> <exclude name="Youdot.Strings.ModifierLetterApostrophe"/> </rule>
If you're using Psalm you can enable
<rule ref="YoudotAdditional.Classes.PsalmImmutable"/>