kmcculloch/phpspec-code-sniffer
Composer 安装命令:
composer require kmcculloch/phpspec-code-sniffer
包简介
Very simple PHPSpec code sniffing, based on PSR1 and PSR2
README 文档
README
Very simple PHPSpec code sniffing, based on PSR1 and PSR2
Kevin McCulloch p.kevin.mcculloch@gmail.com
Purpose
I wrote this module so that I could easily toggle a phpcs standard that won't throw errors for PHPSpec's non-camel-case it_does_something() function naming convention. All it does is apply PSR1 and PSR2 while ignoring the camel-case function naming rule. Stupidly simple, really. I'd be open to expanding the ruleset if others find this useful.
Global Installation
If you have phpcs installed globally (which generally involves running
composer global require squizlabs/php_codesniffer:~2.0 and adding ~/.composer/vendor/bin to your $PATH), you can add this ruleset like so:
composer global require kmcculloch/phpspec-code-sniffer:1.x-dev
# Tell phpcs where to find the ruleset:
phpcs --config-set installed_paths ~/.composer/vendor/kmcculloch/phpspec-code-sniffer/
# Run the following and confirm that you can see "PHPSpec" in the list of
# installed standards:
phpcs -i
# Sniff your code:
phpcs --standard=PHPSpec ~/path/to/MyClassSpec.php
统计信息
- 总下载量: 345
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0
- 更新时间: 2016-06-09