schnittstabil / sugared-php_codesniffer
This package is abandoned and no longer maintained.
The author suggests using the sugared-rim/php_codesniffer package instead.
PHP_CodeSniffer sweetened with ease
3.1.0
2018-03-27 22:45 UTC
Requires
- php: >=5.6.0
- schnittstabil/composer-extra: ^2.0
- schnittstabil/finder-by-config: ^1.0
- squizlabs/php_codesniffer: ^2.6 || 3.0 !=2.8.0 !=3.0.0
Requires (Dev)
- sugared-rim/phpunit: ^6.0 || ^7.0
This package is not auto-updated.
Last update: 2022-02-01 12:57:19 UTC
README
PHP_CodeSniffer sweetened with ease 🍒
SugaredRim\PHP_CodeSniffer takes an opinionated view of code style checking with PHP_CodeSniffer, it is preconfigured to get you up and running as quickly as possible.
Install
$ composer require --dev sugared-rim/php_codesniffer
Usage
Instead of running phpcs
with all its options, just run sugared-rim-phpcs
- that's it:
{ ... "require-dev": { "sugared-rim/php_codesniffer": ... }, "scripts": { "lint": "sugared-rim-phpcs" } }
Configuration
You may overwrite some options by putting it in your composer.json
.
See schnittstabil/finder-by-config for details of the files
options.
Some of the default settings:
{ ... "scripts": { "lint": "sugared-rim-phpcs" }, "extra": { "sugared-rim/php_codesniffer": { "default_standard": ["PSR1", "PSR2"], "files": { "in": ["."], "name": ["*.php"], "files": true, "exclude": [ "build", "bower_components", "node_modules", "vendor" ], "ignoreDotFiles": true, "ignoreVCS": true } } } }
All extra.sugared-rim/php_codesniffer
options are passed through PHP_CodeSniffer::setConfigData, except:
files
: Array of files and/or directories to check.
License
MIT © Michael Mayer