forked from nochso/html-compress-twig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cs
32 lines (27 loc) · 938 Bytes
/
.php_cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
$header = <<<'TAG'
This file is part of nochso/html-compress-twig.
@copyright Copyright (c) 2015 Marcel Voigt <[email protected]>
@license https://github.com/nochso/html-compress-twig/blob/master/LICENSE ISC
@link https://github.com/nochso/html-compress-twig
TAG;
$gitIgnoreLines = array_map(function ($line) {
return rtrim($line, "\r\n\\/");
}, file('.gitignore'));
$finder = Symfony\CS\Finder\DefaultFinder::create()
->in(__DIR__)
->exclude($gitIgnoreLines);
\Symfony\CS\Fixer\Contrib\HeaderCommentFixer::setHeader($header);
return \Symfony\CS\Config\Config::create()
->level(\Symfony\CS\FixerInterface::SYMFONY_LEVEL)
->fixers([
'-psr0', // Does not play well with PSR-4
'concat_with_spaces',
'-concat_without_spaces',
'-empty_return',
'-phpdoc_no_empty_return',
'-return',
'-pre_increment',
'header_comment',
])
->finder($finder);