slam / php-cs-fixer-extensions
Slam extension of friendsofphp/php-cs-fixer
Fund package maintenance!
Slamdunk
paypal.me/filippotessarotto
Installs: 897 223
Dependents: 21
Suggesters: 0
Security: 0
Stars: 68
Watchers: 4
Forks: 2
Open Issues: 1
Requires
- php: ~8.3.0 || ~8.4.0
- ext-mbstring: *
- ext-tokenizer: *
- friendsofphp/php-cs-fixer: ^3.64.0
Requires (Dev)
- phpstan/phpstan: ^1.12.4
- phpstan/phpstan-phpunit: ^1.4.0
- phpunit/phpunit: ^11.3.6
- dev-master
- v3.12.0
- 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
- dev-renovate/php
This package is auto-updated.
Last update: 2024-11-25 10:26:50 UTC
README
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;