janu-software / coding-standard
v8.3.0
2024-07-11 08:15 UTC
Requires
- php: ^7.4 || ^8.0
- friendsofphp/php-cs-fixer: ^3.10 <3.59
- kubawerlos/php-cs-fixer-custom-fixers: ^3.5
- slevomat/coding-standard: ^8.6 <8.16
- squizlabs/php_codesniffer: ^3.6
Requires (Dev)
- tracy/tracy: ^2.5
This package is auto-updated.
Last update: 2024-11-11 09:01:26 UTC
README
This is set of sniffs and fixers that checks and fixes code of Nette Framework against Coding Standard in Documentation.
Installation and Usage
Install the tool in a global directory. Its name will be for example /nette-cs
:
composer create-project janu-software/coding-standard /nette-cs
Check coding standard for PHP 8.3 in folders src
and tests
:
/nette-cs/ecs check src tests --preset php83
And fix it:
/nette-cs/ecs fix src tests --preset php83
If no PHP version is specified, it will try to find out from the composer.json
file.
GitHub Actions
# .github/workflows/coding-style.yml steps: - uses: actions/checkout@v2 - uses: shivammathur/setup-php@v2 with: php-version: 8.3 - run: composer create-project nette/coding-standard temp/coding-standard - run: php temp/coding-standard/ecs check src tests --preset php83