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

3.1.0 2020-12-09 09:41 UTC

This package is auto-updated.

Last update: 2024-10-09 18:31:39 UTC


README

Latest Stable Version Build status PHPStan

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"/>