Skip to content

Commit 3f11f2a

Browse files
Exclude config/{bundles,reference}.php from php-cs-fixer finder (#1518)
1 parent 2bf874b commit 3f11f2a

File tree

3 files changed

+31
-0
lines changed

3 files changed

+31
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
$finder = (new PhpCsFixer\Finder())
4+
->in(__DIR__)
5+
->exclude('var')
6+
->notPath([
7+
'config/bundles.php',
8+
'config/reference.php',
9+
])
10+
;
11+
12+
return (new PhpCsFixer\Config())
13+
->setRules([
14+
'@Symfony' => true,
15+
])
16+
->setFinder($finder)
17+
;
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"aliases": ["cs-fixer", "php-cs-fixer"],
3+
"copy-from-recipe": {
4+
".php-cs-fixer.dist.php": ".php-cs-fixer.dist.php"
5+
},
6+
"gitignore": [
7+
"/.php-cs-fixer.php",
8+
"/.php-cs-fixer.cache"
9+
]
10+
}

php-cs-fixer/shim/3.0/.php-cs-fixer.dist.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
$finder = (new PhpCsFixer\Finder())
44
->in(__DIR__)
55
->exclude('var')
6+
->notPath([
7+
'config/bundles.php',
8+
'config/reference.php',
9+
])
610
;
711

812
return (new PhpCsFixer\Config())

0 commit comments

Comments
 (0)