-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
64 lines (59 loc) · 2.69 KB
/
.php-cs-fixer.dist.php
File metadata and controls
64 lines (59 loc) · 2.69 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
declare(strict_types=1);
require_once __DIR__ . '/vendor/autoload.php';
use Dragonwize\PhpCodeQuality\PhpCsFixer\Rule\DeclareStrictOnOpeningLineFixer;
use Dragonwize\PhpCodeQuality\PhpCsFixer\Rule\PhpDocGenericsSpaceAfterCommaFixer;
use Dragonwize\PhpCodeQuality\PhpCsFixer\Rule\PhpDocTypeUnionNoSpaceFixer;
use Dragonwize\PhpCodeQuality\PhpCsFixer\Rule\PhpDocSingleLineVarFixer;
use Dragonwize\PhpCodeQuality\PhpCsFixer\Rule\VariableNameCaseFixer;
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = new Finder()
->in(__DIR__)
->exclude([
'vendor',
]);
return new Config()
->setRiskyAllowed(true)
->registerCustomFixers([
new DeclareStrictOnOpeningLineFixer(),
new PhpDocGenericsSpaceAfterCommaFixer(),
new PhpDocSingleLineVarFixer(),
new PhpDocTypeUnionNoSpaceFixer(),
new VariableNameCaseFixer(),
])
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP8x5Migration' => true,
'@PHP8x5Migration:risky' => true,
'@PHPUnit91Migration:risky' => true,
'Dragonwize/declare_strict_on_opening_line' => true,
'Dragonwize/variable_name_case' => true,
'Dragonwize/php_doc_generics_space_after_comma' => true,
'Dragonwize/php_doc_single_line_var' => true,
'Dragonwize/php_doc_type_union_no_space' => true,
'binary_operator_spaces' => [
'operators' => [
'=>' => 'align_single_space_by_scope',
'=' => 'align_single_space',
],
],
'class_definition' => [
'single_line' => false,
'inline_constructor_arguments' => false,
'space_before_parenthesis' => true,
],
'concat_space' => ['spacing' => 'one'],
'fully_qualified_strict_types' => ['import_symbols' => true],
'function_declaration' => ['closure_fn_spacing' => 'one'],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'single_line_empty_body' => true,
'whitespace_after_comma_in_array' => ['ensure_single_space' => true],
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
])
->setFinder($finder);