oyova/php-cs-fixer
最新稳定版本:v1.5.0
Composer 安装命令:
composer create-project oyova/php-cs-fixer
包简介
A wrapper for PHP CS Fixer.
README 文档
README
This package is a wrapper for PHP CS Fixer. PHP CS Fixer is used to automatically fix PHP coding standards issues and this package establishes the preferred Oyova rules and simplifies setup.
Installation
Install the package via Composer:
composer require --dev oyova/php-cs-fixer
Setup
In the project root, create a file named .php-cs-fixer.php with the following code:
<?php return (new Oyova\PhpCsFixer\Setup(__FILE__)) // ->in(string|array) // ->exclude(string|array) // ->notName(string|array) ->getConfig();
For WordPress, use Oyova\PhpCsFixer\WordPressSetup instead of Oyova\PhpCsFixer\Setup.
Usage
From the project root, run the command vendor/bin/php-cs-fixer fix to fix all configured files or vendor/bin/php-cs-fixer fix path/to/file.php to fix a specific file or directory. Create a bash alias for the command for ease of use (e.g. alias phpfix='vendor/bin/php-cs-fixer fix').
统计信息
- 总下载量: 1.07k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-11-30