etten / codestyle
Etten Coding Standards for PHP CodeSniffer
Installs: 1 477
Dependents: 7
Suggesters: 0
Security: 0
Stars: 0
Forks: 0
pkg:composer/etten/codestyle
Requires
- php: >=7.0
Requires (Dev)
- squizlabs/php_codesniffer: ~2.6.0
This package is auto-updated.
Last update: 2025-09-10 10:54:14 UTC
README
Coding Standards for PHP CodeSniffer
- Based on Consistence, so read it carefully.
- But it differs in some cases:
- Comments: Inline comments are allowed (code conditions, code folding).
- Comments: Type parameters are not checked (allow shortcuts like int, bool).
- Constants: Uppercase constants including TRUE, FALSE, NULL (Nette Code Style).
- Formatting: There is not space after type cast.
- Formatting: Heredoc syntax is allowed (eg. in tests).
- Functions: Opening brace of function with multiline arguments must be on the same line as closing parenthesis.
- Strings: Double quotes are permitted when contains a variable.
- Whitespace: There is no space after type cast.
- and some other differences.
Example Usage
Install into your project the best via Composer:
$ composer require etten/codestyle
Run PHP CodeSniffer like this:
$ vendor/bin/phpcs --standard=/path/to/Etten/ruleset.xml -sp src tests
Versioning
This packages uses semver.org.