Skip to content

Commit bdf066b

Browse files
committed
Allow to pass in extra rules
1 parent 43fbbb7 commit bdf066b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/PhpCsFixerConfig.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ final class PhpCsFixerConfig
99
/**
1010
* @return Config
1111
*/
12-
public static function create(): Config
12+
public static function create(array $extraRules = []): Config
1313
{
1414
return Config::create()
15-
->setRules([
15+
->setRules(
16+
[
1617
'@PSR2' => true,
1718
'array_syntax' => [
1819
'syntax' => 'short',
@@ -41,7 +42,7 @@ public static function create(): Config
4142
'single_quote' => true,
4243
'strict_param' => true,
4344
'trailing_comma_in_multiline_array' => true,
44-
])
45-
;
45+
] + $extraRules
46+
);
4647
}
4748
}

0 commit comments

Comments
 (0)