1
0
mirror of https://github.com/mrclay/minify.git synced 2025-07-31 19:30:29 +02:00

Setup php-cs-fixer

Setup only to apply @PSR2 rules
This commit is contained in:
Elan Ruusamäe
2019-12-10 08:41:44 +02:00
committed by Elan Ruusamäe
parent a36bfd50b0
commit 263381a23f

44
.php_cs
View File

@@ -1,27 +1,23 @@
<?php <?php
$finder = Symfony\CS\Finder\DefaultFinder::create() $rules = array(
->in(__DIR__ . '/lib') '@PSR2' => true,
; );
return Symfony\CS\Config\Config::create() $config = PhpCsFixer\Config::create();
->level(Symfony\CS\FixerInterface::PSR2_LEVEL) $finder = $config->getFinder();
->setUsingCache(true)
->fixers(array( $finder
'linefeed', ->in(array('.', 'builder/', 'lib/', 'tests/', 'min_extras/', 'static/'))
'trailing_spaces', ->name('*.php')
'unused_use', ->ignoreDotFiles(true)
'short_tag', ->ignoreVCS(true);
'return',
'visibility', return $config
'php_closing_tag', ->setUsingCache(true)
'extra_empty_lines', ->setRiskyAllowed(true)
'function_declaration', ->setRules($rules)
'include', ->setIndent(' ')
'controls_spaces', ->setLineEnding("\n");
'elseif',
'-eof_ending', // vim:ft=php
'-method_argument_space',
))
->finder($finder)
;