About
-----
PHP\_CodeSniffer is a set of two PHP scripts; the main `phpcs` script that tokenizes PHP, JavaScript and CSS files to detect violations of a defined coding standard, and a second `phpcbf` script to automatically correct coding standard violations. PHP\_CodeSniffer is an essential development tool that ensures your code remains clean and consistent.
[![Build Status](https://travis-ci.org/squizlabs/PHP_CodeSniffer.svg?branch=phpcs-fixer)](https://travis-ci.org/squizlabs/PHP_CodeSniffer) [![Code consistency](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer/grade.svg)](http://squizlabs.github.io/PHP_CodeSniffer/analysis/squizlabs/PHP_CodeSniffer)
[![Join the chat at https://gitter.im/squizlabs/PHP_CodeSniffer](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/squizlabs/PHP_CodeSniffer?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Requirements
------------
PHP\_CodeSniffer requires PHP version 5.1.2 or greater, although individual sniffs may have additional requirements such as external applications and scripts. See the [Configuration Options manual page](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Configuration-Options) for a list of these requirements.
The SVN pre-commit hook requires PHP version 5.2.4 or greater due to its use of the vertical whitespace character.
Installation
------------
The easiest way to get started with PHP\_CodeSniffer is to download the [Phar](http://php.net/manual/en/intro.phar.php) files for each of the commands:
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
php phpcs.phar -h
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcbf.phar
php phpcbf.phar -h
If you use PEAR, you can install PHP\_CodeSniffer using the PEAR installer. This will make the `phpcs` and `phpcbf` commands immediately available for use. To install PHP\_CodeSniffer using the PEAR installer, first ensure you have [installed PEAR](http://pear.php.net/manual/en/installation.getting.php) and then run the following command:
pear install PHP_CodeSniffer
If you prefer using [Composer](http://getcomposer.org/) you can easily install PHP_CodeSniffer system-wide with the following command:
composer global require "squizlabs/php_codesniffer=*"
Make sure you have `~/.composer/vendor/bin/` in your PATH.
Or alternatively, include a dependency for `squizlabs/php_codesniffer` in your `composer.json` file. For example:
{
"require-dev": {
"squizlabs/php_codesniffer": "2.*"
}
}
You will then be able to run PHP_CodeSniffer from the vendor bin directory:
./vendor/bin/phpcs -h
./vendor/bin/phpcbf -h
You can also download the PHP\_CodeSniffer source and run the `phpcs` and `phpcbf` commands directly from the Git checkout:
git clone git://github.com/squizlabs/PHP_CodeSniffer.git
cd PHP_CodeSniffer
php scripts/phpcs -h
php scripts/phpcbf -h
Documentation
-------------
The documentation for PHP\_CodeSniffer is available on the [Github wiki](https://github.com/squizlabs/PHP_CodeSniffer/wiki).
Information about upcoming features and releases is available on the [Squiz Labs blog](http://www.squizlabs.com/php-codesniffer).
Issues
------
Bug reports and feature requests can be submitted on the [Github Issue Tracker](https://github.com/squizlabs/PHP_CodeSniffer/issues) or the [PEAR bug tracker](http://pear.php.net/package/PHP_CodeSniffer/bugs).
Contributing
-------------
See [CONTRIBUTING.md](CONTRIBUTING.md) for information.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
linux工作环境:常用配置、命令、脚本等。_myenv.zip (960个子文件)
AdBlock 596B
add_color 362B
.bashrc 1005B
phpcs.bat 715B
phpcbf.bat 595B
cm 72B
mpv.conf 1KB
ClassDefinitionNameSpacingUnitTest.css 1KB
IndentationUnitTest.css 979B
ColonSpacingUnitTest.css 928B
ShorthandSizeUnitTest.css 777B
ClassDefinitionOpeningBraceSpaceUnitTest.css 609B
DisallowMultipleStyleDefinitionsUnitTest.css 580B
ClassDefinitionClosingBraceSpaceUnitTest.css 533B
SuperfluousWhitespaceUnitTest.1.css 519B
CommentedOutCodeUnitTest.css 489B
ForbiddenStylesUnitTest.css 480B
SemicolonSpacingUnitTest.css 465B
DuplicateStyleDefinitionUnitTest.css 443B
DuplicateClassDefinitionUnitTest.css 416B
LowercaseStyleDefinitionUnitTest.css 409B
BrowserSpecificStylesUnitTest.css 281B
EmptyClassDefinitionUnitTest.css 256B
MissingColonUnitTest.css 253B
ColourDefinitionUnitTest.css 232B
NamedColoursUnitTest.css 221B
OpacityUnitTest.css 187B
EmptyStyleDefinitionUnitTest.css 98B
DisallowTabIndentUnitTest.css 62B
DisallowSpaceIndentUnitTest.css 61B
SuperfluousWhitespaceUnitTest.3.css 51B
SuperfluousWhitespaceUnitTest.2.css 50B
LineEndingsUnitTest.css 49B
EndFileNewlineUnitTest.1.css 22B
EndFileNoNewlineUnitTest.1.css 22B
EndFileNoNewlineUnitTest.2.css 21B
EndFileNewlineUnitTest.2.css 21B
EndFileNoNewlineUnitTest.3.css 20B
EndFileNewlineUnitTest.3.css 20B
CodeSniffer.conf.dist 187B
ScopeIndentUnitTest.1.inc.fixed 15KB
ScopeIndentUnitTest.2.inc.fixed 11KB
ArrayDeclarationUnitTest.1.inc.fixed 6KB
ArrayDeclarationUnitTest.2.inc.fixed 6KB
MultipleStatementAlignmentUnitTest.inc.fixed 5KB
FunctionCallSignatureUnitTest.inc.fixed 4KB
ScopeIndentUnitTest.1.js.fixed 3KB
OpeningFunctionBraceBsdAllmanUnitTest.inc.fixed 3KB
FunctionSpacingUnitTest.inc.fixed 3KB
FunctionDeclarationUnitTest.inc.fixed 3KB
OperatorSpacingUnitTest.inc.fixed 3KB
MultiLineConditionUnitTest.inc.fixed 2KB
OpeningFunctionBraceKernighanRitchieUnitTest.inc.fixed 2KB
SwitchDeclarationUnitTest.inc.fixed 2KB
ClassDeclarationUnitTest.inc.fixed 2KB
InlineControlStructureUnitTest.inc.fixed 2KB
ControlSignatureUnitTest.inc.fixed 2KB
ScopeClosingBraceUnitTest.inc.fixed 2KB
MultiLineConditionUnitTest.js.fixed 2KB
FunctionCallSignatureUnitTest.js.fixed 2KB
MemberVarSpacingUnitTest.inc.fixed 2KB
FunctionClosingBraceSpaceUnitTest.js.fixed 2KB
MultipleStatementAlignmentUnitTest.js.fixed 2KB
IncludingFileUnitTest.inc.fixed 2KB
ClassDeclarationUnitTest.inc.fixed 2KB
EmbeddedPhpUnitTest.inc.fixed 2KB
InlineCommentUnitTest.inc.fixed 2KB
ControlSignatureUnitTest.js.fixed 1KB
FunctionCallSignatureUnitTest.inc.fixed 1KB
LowerCaseConstantUnitTest.inc.fixed 1KB
UpperCaseConstantUnitTest.inc.fixed 1KB
DocCommentAlignmentUnitTest.inc.fixed 1KB
DocCommentAlignmentUnitTest.js.fixed 1KB
ControlStructureSpacingUnitTest.inc.fixed 1KB
OperatorSpacingUnitTest.js.fixed 1KB
ForEachLoopDeclarationUnitTest.inc.fixed 974B
ConcatenationSpacingUnitTest.inc.fixed 754B
SuperfluousWhitespaceUnitTest.inc.fixed 688B
SuperfluousWhitespaceUnitTest.1.js.fixed 605B
PropertyLabelSpacingUnitTest.js.fixed 581B
DoubleQuoteUsageUnitTest.inc.fixed 569B
MethodDeclarationUnitTest.inc.fixed 526B
SuperfluousWhitespaceUnitTest.1.css.fixed 507B
DisallowTabIndentUnitTest.inc.fixed 503B
LowerCaseKeywordUnitTest.inc.fixed 495B
FunctionClosingBraceSpaceUnitTest.inc.fixed 472B
InlineCommentUnitTest.inc.fixed 390B
ScopeIndentUnitTest.3.inc.fixed 352B
LowerCaseConstantUnitTest.js.fixed 300B
InlineControlStructureUnitTest.js.fixed 285B
DisallowLongArraySyntaxUnitTest.inc.fixed 206B
UseDeclarationUnitTest.3.inc.fixed 195B
ElseIfDeclarationUnitTest.inc.fixed 187B
DisallowShortArraySyntaxUnitTest.inc.fixed 178B
NamespaceDeclarationUnitTest.inc.fixed 176B
UseDeclarationUnitTest.2.inc.fixed 168B
DisallowTabIndentUnitTest.js.fixed 79B
DisallowTabIndentUnitTest.css.fixed 68B
SuperfluousWhitespaceUnitTest.3.css.fixed 50B
SuperfluousWhitespaceUnitTest.2.css.fixed 50B
共 960 条
- 1
- 2
- 3
- 4
- 5
- 6
- 10
资源评论
好家伙VCC
- 粉丝: 2371
- 资源: 9142
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 【未发表】基于淘金优化算法GRO优化鲁棒极限学习机RELM实现负荷数据回归预测算法研究附Matlab代码.rar
- 【未发表】基于鹈鹕优化算法POA优化集成学习结合鲁棒极限学习机RELM-Adaboost实现负荷数据回归预测算法研究附Matlab代码.rar
- 【未发表】基于鹈鹕优化算法POA优化集成学习结合核极限学习机KELM-Adaboost实现风电数据时序预测算法研究附Matlab代码.rar
- 【未发表】基于鹈鹕优化算法POA优化鲁棒极限学习机RELM实现负荷数据回归预测算法研究附Matlab代码.rar
- 【未发表】基于鹈鹕优化算法POA优化宽度学习BLS实现光伏数据预测算法研究附Matlab代码.rar
- 【未发表】基于天鹰优化算法AO优化集成学习结合核极限学习机KELM-Adaboost实现风电数据时序预测算法研究附Matlab代码.rar
- 【未发表】基于天鹰优化算法AO优化宽度学习BLS实现光伏数据预测算法研究附Matlab代码.rar
- 【未发表】基于天鹰优化算法AO优化鲁棒极限学习机RELM实现负荷数据回归预测算法研究附Matlab代码.rar
- 【未发表】基于天鹰优化算法AO优化集成学习结合鲁棒极限学习机RELM-Adaboost实现负荷数据回归预测算法研究附Matlab代码.rar
- 【未发表】基于秃鹰优化算法BES优化宽度学习BLS实现光伏数据预测算法研究附Matlab代码.rar
- 【未发表】基于秃鹰优化算法BES优化集成学习结合鲁棒极限学习机RELM-Adaboost实现负荷数据回归预测算法研究附Matlab代码.rar
- 【未发表】基于秃鹰优化算法BES优化集成学习结合核极限学习机KELM-Adaboost实现风电数据时序预测算法研究附Matlab代码.rar
- 【未发表】基于秃鹰优化算法BES优化鲁棒极限学习机RELM实现负荷数据回归预测算法研究附Matlab代码.rar
- 【未发表】基于雾凇优化算法RIME优化集成学习结合鲁棒极限学习机RELM-Adaboost实现负荷数据回归预测算法研究附Matlab代码.rar
- 【未发表】基于雾凇优化算法RIME优化集成学习结合核极限学习机KELM-Adaboost实现风电数据时序预测算法研究附Matlab代码.rar
- 【未发表】基于雾凇优化算法RIME优化鲁棒极限学习机RELM实现负荷数据回归预测算法研究附Matlab代码.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功