1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-05 05:38:14 +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

42
.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();
$finder
->in(array('.', 'builder/', 'lib/', 'tests/', 'min_extras/', 'static/'))
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return $config
->setUsingCache(true) ->setUsingCache(true)
->fixers(array( ->setRiskyAllowed(true)
'linefeed', ->setRules($rules)
'trailing_spaces', ->setIndent(' ')
'unused_use', ->setLineEnding("\n");
'short_tag',
'return', // vim:ft=php
'visibility',
'php_closing_tag',
'extra_empty_lines',
'function_declaration',
'include',
'controls_spaces',
'elseif',
'-eof_ending',
'-method_argument_space',
))
->finder($finder)
;