Php Cs Fixer Extensions Save

PHP-CS-Fixer extensions and configurations

Project README

Slam PHP-CS-Fixer extensions

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;
Open Source Agenda is not affiliated with "Php Cs Fixer Extensions" Project. README Source: Slamdunk/php-cs-fixer-extensions
Stars
68
Open Issues
2
Last Commit
1 week ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating