Skip to content

Commit 418c753

Browse files
committed
Allow custom rules and disable PHPUnit fixers
1 parent f636bc2 commit 418c753

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

src/ConfigFactory.php

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030

3131
final readonly class ConfigFactory
3232
{
33-
public static function create() : Config
33+
/**
34+
* @param array<string, array<string, mixed>|bool> $rules
35+
*/
36+
public static function create(array $rules = []) : Config
3437
{
3538
$whitespacesFixerConfig = new WhitespacesFixerConfig(' ', "\n");
3639
$blockfinder = new BlockFinder();
@@ -203,16 +206,6 @@ public static function create() : Config
203206
'null_adjustment' => 'always_first',
204207
'sort_algorithm' => 'alpha',
205208
],
206-
'php_unit_fqcn_annotation' => true,
207-
'php_unit_method_casing' => [
208-
'case' => 'snake_case',
209-
],
210-
'php_unit_test_annotation' => [
211-
'style' => 'annotation',
212-
],
213-
'php_unit_test_case_static_method_calls' => [
214-
'call_type' => 'self',
215-
],
216209
'phpdoc_align' => [
217210
'align' => 'left',
218211
],
@@ -288,6 +281,8 @@ public static function create() : Config
288281
'identical' => false,
289282
'less_and_greater' => null,
290283
],
284+
285+
...$rules,
291286
]);
292287
}
293288
}

0 commit comments

Comments
 (0)