proyecto404/coding-standard
Composer 安装命令:
composer require proyecto404/coding-standard
包简介
404's PHP Code Sniffer Coding Standard
README 文档
README
Installation
You can install this library using composer
$ php composer.phar require proyecto404/coding-standard "dev-master" --dev
or add the package to your composer.json file directly.
Composer will install the library to your project's vendor/proyecto404 directory.
Phing configuration
Add this to your phing's build.xml file:
<target name="check:cs" description="Checks coding standard." depends="prepare"> <echo msg="Checking coding standard ..." /> <phpcodesniffer standard="vendor/proyecto404/coding-standard/Proyecto404" showSniffs="true" showWarnings="true"> <fileset refid="sourcecode" /> <formatter type="checkstyle" outfile="${dir.reports}/checkstyle.xml" /> </phpcodesniffer> </target>
You have to configure your reports directory:
<property name="dir.reports" value="${dir.build}/logs" />
PHP Storm configuration
In Settings/Languages & Frameworks/PHP/CodeSniffer configure directory to point to [PROJECT_DIR]/bin/phpcs.bat
In Settings/Editor/PHP/Inspections enable PHP/PHP Code Sniffer validation
In Settings/Editor/PHP/Inspections/PHP/Code Sniffer select custom coding standard and point directory to [PROJECT_DIR]/vendor/proyecto404/coding-standard/Proyecto404
License
This code is under the MIT license. See the complete license in the LICENSE file.
统计信息
- 总下载量: 244
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-11