smartbees / coding-standards-drupal
2.5.0
2025-03-05 06:40 UTC
Requires
- composer-runtime-api: ^2.2
- acquia/coding-standards: ^2.0
- armin/editorconfig-cli: ^2.0.0
- dealerdirect/phpcodesniffer-composer-installer: ^1.0
- drupal/coder: ^8.3.24
- mglaman/phpstan-drupal: ^1.2.11
- phpstan/phpstan: ^1.11.2
- phpstan/phpstan-deprecation-rules: ^1.2
- phpstan/phpstan-strict-rules: ^1.6
- slevomat/coding-standard: ^8.16
- squizlabs/php_codesniffer: ^3.10.1
- symfony/console: ^6.4 || ^7.1
- vincentlanglet/twig-cs-fixer: ^2.10.1
- wotnak/twig-cs-fixer-drupal: ^1.0.0
Requires (Dev)
- ergebnis/composer-normalize: ^2.42
README
# Install coding standards.
composer req --dev smartbees/coding-standards-drupal
vendor/bin/sbcs init
# Add 'sbcs init' to the 'post-update-cmd' scripts in the composer.json file
# to automatically install the coding standards configs updates when they are
# available.
...
"scripts": {
"post-update-cmd": [
"vendor/bin/sbcs init"
],
...
# Run static analysis of the code.
vendor/bn/sbcs check
# Execute automatic code style fixes.
vendor/bin/sbcs check --fix