figlab/coding-standard
最新稳定版本:1.0.5
Composer 安装命令:
composer require figlab/coding-standard
包简介
PHPCS coding-standard for Laravel applications.
README 文档
README
PHPCS coding-standard for Laravel applications and packages. Based on the awesome IxDF Coding Standard.
Installation
- Install the package via composer by running:
composer require --dev figlab/coding-standard
- Add composer scripts into your
composer.json:
"scripts": { "cs:check": "phpcs -p -s --colors --report-full --report-summary", "cs:fix": "phpcbf -p --colors" }
- Create file
phpcs.xmlon base path of your repository with content
<?xml version="1.0"?> <ruleset name="My Coding Standard"> <!-- Include all rules from the IxDF Coding Standard --> <rule ref="FigLabCodingStandard"/> <!-- Paths to check --> <file>app</file> <file>config</file> <file>database</file> <file>lang</file> <file>routes</file> <file>tests</file> </ruleset>
Usage
- To run checks only:
composer cs:check
- To automatically fix CS issues:
composer cs:fix
统计信息
- 总下载量: 642
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-05-10