maarheeze/phpcs
最新稳定版本:1.0.4
Composer 安装命令:
composer require maarheeze/phpcs
包简介
phpcs-extension with a custom ruleset
README 文档
README
extension of PHPCSStandards/PHP_CodeSniffer, but with a custom ruleset
installation
- require the package
composer require maarheeze/phpcs --dev
- create
phpcs.xml.distfile in the root of the project as a starting point:
<?xml version="1.0" encoding="UTF-8"?> <rule name="phpcs"> <description>phpcs</description> <arg value="sp"/> <arg name="colors"/> <arg name="cache" value="/tmp/.phpcs.cache"/> <arg name="extensions" value="php"/> <file>.</file> <exclude-pattern>./node_modules</exclude-pattern> <exclude-pattern>./vendor</exclude-pattern> <rule ref="maarheeze"/> </rule>
optional
- add
phpcs.xmlto the.gitignorein the root of the project (to allow local override) - add folders to exclude
usage
php vendor/bin/phpcs
统计信息
- 总下载量: 105
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 7
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2023-10-30