developion/coding-standards
最新稳定版本:1.1.4
Composer 安装命令:
composer require developion/coding-standards
包简介
README 文档
README
Based on PSR12, a few targeted tweaks and fixers are aimed to general consistency of the code.
Requirements
- PHP 8.2+
Installation
composer require --dev developion/coding-standards
ECS
Add ecs.php to the root of your project, and set the content to:
use Developion\CodingStandards\SetList; $config = require SetList::DEVELOPION; return $config->withPaths([ __DIR__ . '<PATH>', __FILE__, ]);
The line __DIR__ . '<PATH>' deserves special attention, as it needs to be configured to point to the code of the project that needs to be checked. If necessary, it can be duplicated as many times as necessary.
PHP CS Fixer
Add .php-cs-fixer.php to the root of your project, and set the content to:
use Developion\CodingStandards\SetList; use PhpCsFixer\Finder; $finder = (new Finder()) ->in([ __DIR__ . '<PATH>', ]) ->ignoreDotFiles(false) ->ignoreVCSIgnored(true) ->exclude([ __DIR__ . '/vendor', ]) ; $config = require SetList::PHP_CS_FIXER; return $config($finder);
Adjust the <PATH> to your code accordingly.
TODO: add VS Code config
统计信息
- 总下载量: 559
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-03-17