palmtree/php-cs-fixer-config
最新稳定版本:v2.1.1
Composer 安装命令:
composer require palmtree/php-cs-fixer-config
包简介
PHP CS Fixer config for Palmtree components
README 文档
README
PHP-CS-Fixer config for Palmtree components
Requirements
- PHP >= 7.1
Installation
Use composer to add the package to your dev dependencies:
composer require palmtree/php-cs-fixer-config --dev
"scripts": { "sniff": "vendor/bin/php-cs-fixer fix -v --dry-run --stop-on-violation --using-cache=no --diff --diff-format=udiff", "fix": "vendor/bin/php-cs-fixer fix --diff", }
Usage
Create a .php_cs.dist file in your project's root directory.
You can copy a typical config file from this repository if desired:
$ cp vendor/palmtree/php-cs-fixer-config/.php_cs.dist .
Add the following entries to your .gitignore file:
/.php_cs.cache
/.php_cs
Fixing Issues
Manually
To fix issues manually, run the following command:
$ composer fix
To perform a dry run, run the following command:
$ composer sniff
Pre-commit hook
Run the following to have PHP-CS-Fixer run on changed files before every commit:
$ cp vendor/palmtree/php-cs-fixer-config/git-hooks/pre-commit .git/hooks/pre-commit $ chmod +x .git/hooks/pre-commit
License
Released under the MIT license
统计信息
- 总下载量: 1.91k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 17
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-29