slam/php-cs-fixer-extensions
Slam extension of friendsofphp/php-cs-fixer
Maintainers
v3.15.0
2026-03-23 14:12 UTC
Requires
- php: ~8.4.0 || ~8.5.0
- ext-mbstring: *
- ext-tokenizer: *
- friendsofphp/php-cs-fixer: ^3.94.2
Requires (Dev)
- phpstan/phpstan: ^2.1.42
- phpstan/phpstan-phpunit: ^2.0.16
- phpunit/phpunit: ^13.0.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT acd0d814e681940c3f0e37755e1415913b08d423
- Filippo Tessarotto <zoeslam.woop@gmail.com>
This package is auto-updated.
Last update: 2026-06-16 22:39:46 UTC
README
👁 Latest Stable Version
👁 Downloads
👁 Integrate
PHP-CS-Fixer extensions and configurations
Installation
Execute:
composer require --dev slam/php-cs-fixer-extensions
Usage
In your .php_cs file:
<?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;
