nette / coding-standard
v3.0.5
2021-03-04 19:51 UTC
Requires
- php: ^7.2 || ^8.0
- drew/debug-statements-fixers: ^0.5.0
- slevomat/coding-standard: ^6
- symplify/coding-standard: ^9.0
- symplify/easy-coding-standard: ^9.0
Requires (Dev)
- tracy/tracy: ^2.5
Conflicts
- symplify/set-config-resolver: >=9.2
README
This is set of sniff and fixers combined under EasyCodingStandard that checks and fixes your PHP code against Coding Standard in Documentation.
What Rules are Covered?
This package covers part of official rules, not all.
When you open /examples
directory, all files you'll see are checked by this coding standard. The code might look invalid compared to Nette code you know, but it's only because this tool doesn't check it (yet).
All general rules you can find in preset/php56.php
file.
Install and Use
Local Setup
Installation into global folder named nette-coding-standard
:
composer create-project nette/coding-standard nette-coding-standard
Check coding standard:
nette-coding-standard/ecs check src tests --preset php71
And fix it:
nette-coding-standard/ecs check src tests --preset php71 --fix
Travis Setup
# .travis.yml install: - composer create-project nette/coding-standard temp/nette-coding-standard script: - temp/nette-coding-standard/ecs check src tests --preset php71