Skip to content

Commit 851f69f

Browse files
authored
Merge pull request #3 from Innmind/cs-fixer-config
Forward the environment keys to PHP CS Fixer
2 parents 0bacb5c + f2ff87e commit 851f69f

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
},
3737
"require-dev": {
3838
"phpunit/phpunit": "~10.2",
39-
"vimeo/psalm": "~5.15",
39+
"innmind/static-analysis": "~1.1",
4040
"innmind/black-box": "~5.5",
4141
"innmind/coding-standard": "~2.0"
4242
},

src/Trigger/CodingStandard.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ private function run(
6868
/** @var Map<non-empty-string, string> */
6969
$variables = $console
7070
->variables()
71-
->filter(static fn($key) => $key === 'PATH');
71+
->filter(static fn($key) => \in_array(
72+
$key,
73+
['PATH', 'PHP_CS_FIXER_IGNORE_ENV'],
74+
true,
75+
));
7276

7377
$command = Command::foreground('vendor/bin/php-cs-fixer')
7478
->withArgument('fix')

0 commit comments

Comments
 (0)