metasyntactical/composer-codesniffer-hooks
最新稳定版本:v1.0.1
Composer 安装命令:
composer require metasyntactical/composer-codesniffer-hooks
包简介
PHP CodeSniffer script hooks for composer
README 文档
README
Hooks to enable PHP CodeSniffer with the Coding Standard configurable after running composer install or composer update.
The project is abandoned!
This project is abandoned in favor of captainhook/captainhook providing general git hooks management. Everything in this repository can be achieved with captainhook/captainhook.
Install
Install dependency via composer:
$ composer require --dev metasyntactical/composer-codesniffer-hooks
Add scripts to composer post hooks:
"scripts": { "post-install-cmd": [ "MetaSyntactical\\CodeSniffer\\Composer\\ScriptHandler::addPhpCsToPreCommitHook" ], "post-update-cmd": [ "MetaSyntactical\\CodeSniffer\\Composer\\ScriptHandler::addPhpCsToPreCommitHook" ] }
Add the codesniffer standard which has been installed as dependency (e.g. "metasyntactical/symfony-coding-standard") to the extra field in composer.json:
"extras": { "codesniffer": { "standard": { "dependency": "metasyntactical/symfony-coding-standard" } } }
On each composer install or composer update the hook will be deployed to the local git repository.
Usage
Every time you try to commit, PHP_CodeSniffer will run on changed .php files only. There is nothing to do manually.
统计信息
- 总下载量: 64
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-25