-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
48 lines (39 loc) · 1.35 KB
/
.php-cs-fixer.dist.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('vendor')
;
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
// Automatically adds trailing commas in multiline
'trailing_comma_in_multiline' => [
'elements' => [
'arrays',
'arguments',
'parameters',
],
],
// This rule leads to @psalm-suppress comments being ignored
'phpdoc_to_comment' => false,
// We want to use standard snake case for tests
'php_unit_method_casing' => [
'case' => 'snake_case',
],
// Yoda style is more difficult to read and the issues it would prevent are already prevented by Psalm
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
'always_move_variable' => true,
],
// Add spaces around union and intersection types
'types_spaces' => [
'space' => 'single',
],
// Nullable types should be explicit even with default values
'nullable_type_declaration_for_default_null_value' => false,
// Throw in a single line is worse to read when using ternary operator
'single_line_throw' => false,
])
->setFinder($finder);