lst/typo3-phpcsfixer-rules
最新稳定版本:0.3.0
Composer 安装命令:
composer require lst/typo3-phpcsfixer-rules
包简介
The PHP Coding Standards Fixer rules used by the TYPO3 CMS
README 文档
README
This package provides the PHP Coding Standards Fixer rules used by the TYPO3 CMS in a static method. Additionally, it provides the custom rules for LST TYPO3 projects in a static method. That's it.
This package has no dependencies, you need to install PHP-CS-Fixer on your own.
Usage
Install the package via composer:
composer require lst/typo3-phpcsfixer-rules --dev
You can access the rules in your PHP-CS-Fixer configuration by calling \LST\TYPO3PhpCsFixerRules\PhpCsFixer::getRules().
To access the official rules only, use \LST\TYPO3PhpCsFixerRules\PhpCsFixer::getOfficialRules().
Example config
An example .php-cs-fixer.php file to fix code in the folder packages:
<?php require_once 'vendor/lst/typo3-phpcsfixer-rules/src/PhpCsFixer.php'; $finder = PhpCsFixer\Finder::create() ->in('packages'); $config = new PhpCsFixer\Config(); return $config->setRules(\LST\TYPO3PhpCsFixerRules\PhpCsFixer::getRules()) ->setRiskyAllowed(true) ->setFinder($finder);
统计信息
- 总下载量: 412
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0-or-later
- 更新时间: 2023-03-28