cryonighter / cryonighter-coding-standard
cryonighter编码标准的CodeSniffer规则集
1.0.2
2019-08-27 12:14 UTC
Requires
- escapestudios/symfony2-coding-standard: ^3.5.2
- squizlabs/php_codesniffer: ^3.3.1
Requires (Dev)
- phpunit/phpunit: >= 5.0
Conflicts
- squizlabs/php_codesniffer: <3 || >=4
This package is not auto-updated.
Last update: 2024-09-18 20:45:46 UTC
README
这是一个检查cryonighter编码标准的编码标准,最初不客气地从已消失的opensky/Symfony2-coding-standard仓库中复制。
通过Composer安装
此标准可以通过Composer依赖管理器安装。
-
将编码标准作为项目的依赖项安装
composer global require cryonighter/cryonighter-coding-standard -
将编码标准添加到PHP_CodeSniffer安装路径
phpcs --config-set installed_paths ../../../vendor/escapestudios/symfony2-coding-standard,../../../vendor/cryonighter/cryonighter-coding-standard -
检查已安装的编码标准中的"Symfony"和"Cryonighter"
phpcs -i
独立安装
-
检出此仓库
git clone git://github.com/djoos/Symfony2-coding-standard.git symfony2-coding-standard && git clone git@github.com:cryonighter/cryonighter-coding-standard.git -
将编码标准添加到PHP_CodeSniffer安装路径
phpcs --config-set installed_paths /path/to/symfony2-coding-standard,/path/to/cryonighter-coding-standard或将
Symfony和Cryonighter文件夹移动/复制/符号链接到phpcs的Standards目录中 -
检查已安装的编码标准中的"Symfony"和"Cryonighter"
phpcs -i
用法
通过命令行
phpcs --standard=Cryonighter --extensions=php --ignore=/path/to/exclude-code /path/to/code