slam / php-cs-fixer-extensions
friendsofphp/php-cs-fixer 的 Slam 扩展
v3.11.1
2024-06-17 07:59 UTC
Requires
- php: ~8.2.0 || ~8.3.0
- ext-mbstring: *
- ext-tokenizer: *
- friendsofphp/php-cs-fixer: ^3.59.3
Requires (Dev)
- phpstan/phpstan: ^1.11.4
- phpstan/phpstan-phpunit: ^1.4.0
- phpunit/phpunit: ^11.2.2
- dev-master
- v3.11.1
- v3.11.0
- v3.10.0
- v3.9.0
- v3.8.0
- v3.7.0
- v3.6.0
- v3.5.0
- v3.4.0
- v3.3.0
- v3.2.1
- v3.2.0
- v3.1.0
- v3.0.1
- v3.0.0
- v2.2.0
- v2.1.0
- v2.0.0
- v1.19.4
- v1.19.3
- v1.19.2
- v1.19.1
- v1.19.0
- v1.18.1
- v1.18.0
- v1.17.0
- v1.16.0
- v1.15.0
- v1.14.0
- v1.13.0
- v1.12.3
- v1.12.2
- v1.12.1
- v1.12.0
- v1.11.0
- v1.10.1
- v1.10.0
- v1.9.2
- v1.9.1
- v1.9.0
- v1.8.1
- v1.8.0
- v1.7.2
- v1.7.1
- v1.7.0
- v1.6.0
- v1.5.0
- v1.4.0
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.3
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.2
- v1.0.1
- v1.0.0
- dev-renovate/all-minor-patch
This package is auto-updated.
Last update: 2024-09-19 14:31:53 UTC
README
PHP-CS-Fixer 扩展和配置
安装
执行
composer require --dev slam/php-cs-fixer-extensions
使用方法
在您的 .php_cs
文件中
<?php $config = new PhpCsFixer\Config(); $config->setRiskyAllowed(true); $config->registerCustomFixers([ new SlamCsFixer\FinalAbstractPublicFixer(), new SlamCsFixer\FinalInternalClassFixer(), new SlamCsFixer\FunctionReferenceSpaceFixer(), new SlamCsFixer\InlineCommentSpacerFixer(), new SlamCsFixer\PhpFileOnlyProxyFixer(new PhpCsFixer\Fixer\Basic\BracesFixer()), new SlamCsFixer\Utf8Fixer(), ]); $this->setRules([ 'Slam/final_abstract_public' => true, 'Slam/final_internal_class' => true, 'Slam/function_reference_space' => true, 'Slam/inline_comment_spacer' => true, 'Slam/php_only_braces' => true, 'Slam/utf8' => true, ]); $config->getFinder() ->in(__DIR__ . '/app') ->in(__DIR__ . '/tests') ->name('*.phtml') ; return $config;