hellochef-me/php-styles
最新稳定版本:1.0.9
Composer 安装命令:
composer require hellochef-me/php-styles
包简介
HelloChef shared PHP style rules for PHP-CS-Fixer
README 文档
README
HelloChef PHP Code Styles
Shared PHP style rules for PHP-CS-Fixer
Install the package
composer require hellochef-me/php-styles
Create and setup config file in project root .php-cs-fixer.php
<?php return HelloChef\CodeStyles\PhpStyles::style();
Optionally, you may add php-cs-fixer cache file to your .gitignore
// .gitignore
.php-cs-fixer.cache
Format code on demand
- Format the whole project
vendor/bin/php-cs-fixer fix .
- Format specific file
vendor/bin/php-cs-fixer fix Path/To/ExampleFileToFormat.php
Format code on commit
Add the following scripts to your composer.json
"scripts": { "post-update-cmd": [ "cp vendor/hellochef-me/php-styles/pre-commit .git/hooks/pre-commit", "chmod a+x .git/hooks/pre-commit" ], "post-install-cmd": [ "cp vendor/hellochef-me/php-styles/pre-commit .git/hooks/pre-commit", "chmod a+x .git/hooks/pre-commit" ], },
统计信息
- 总下载量: 58.53k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-26