Skip to content

Commit

Permalink
Merge pull request #3 from Innmind/cs-fixer-config
Browse files Browse the repository at this point in the history
Forward the environment keys to PHP CS Fixer
  • Loading branch information
Baptouuuu authored Feb 9, 2025
2 parents 0bacb5c + f2ff87e commit 851f69f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"require-dev": {
"phpunit/phpunit": "~10.2",
"vimeo/psalm": "~5.15",
"innmind/static-analysis": "~1.1",
"innmind/black-box": "~5.5",
"innmind/coding-standard": "~2.0"
},
Expand Down
6 changes: 5 additions & 1 deletion src/Trigger/CodingStandard.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ private function run(
/** @var Map<non-empty-string, string> */
$variables = $console
->variables()
->filter(static fn($key) => $key === 'PATH');
->filter(static fn($key) => \in_array(
$key,
['PATH', 'PHP_CS_FIXER_IGNORE_ENV'],
true,
));

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

0 comments on commit 851f69f

Please sign in to comment.