nexylan / coding-standard
Nexylan PHP 编码标准
v0.1.1
2019-03-22 10:17 UTC
Requires
This package is auto-updated.
Last update: 2024-09-22 22:54:29 UTC
README
Nexylan 编码标准是一套针对许多代码风格工具的配置。
PHP_CodeSniffer (PHP)
Nexylan 编码标准基于 PSR 和 Symfony 标准,并包含一些来自 Slevomat 编码标准 的规则。
使用方法
使用 php-code-sniffer 全局安装它(推荐)
composer global require nexylan/coding-standard
或者,作为项目的依赖项
composer require --dev nexylan/coding-standard
然后在你的 ruleset.xml
文件中添加标准
<?xml version="1.0"?> <ruleset name="My project standard"> <rule ref="Nexylan"/> </ruleset>
这是最快的方法,但你当然也可以个性化或禁用一些规则。