sugared-rim/php_codesniffer
Composer 安装命令:
composer require sugared-rim/php_codesniffer
包简介
PHP_CodeSniffer sweetened with ease
README 文档
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
统计信息
- 总下载量: 347
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-11-08