forked from cmoralesweb/Verify
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
64 lines (61 loc) · 3.54 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in(__DIR__);
return (new PhpCsFixer\Config())
->setRules([
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHPUnit84Migration:risky' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'binary_operator_spaces' => [
'default' => 'align_single_space_minimal',
'operators' => ['||' => 'single_space', '&&' => 'single_space', '|' => 'no_space'],
],
'class_attributes_separation' => [
'elements' => [
'const' => 'only_if_meta',
'method' => 'one',
'property' => 'only_if_meta',
'trait_import' => 'none',
],
],
'class_definition' => [
'multi_line_extends_each_single_line' => true,
'single_item_single_line' => true,
'space_before_parenthesis' => true,
],
'concat_space' => ['spacing' => 'one'],
'date_time_immutable' => true,
'echo_tag_syntax' => ['format' => 'short'],
'escape_implicit_backslashes' => ['single_quoted' => true],
'final_public_method_for_abstract_class' => true,
'general_phpdoc_annotation_remove' => ['annotations' => ['author', 'category', 'filesource', 'source']],
'global_namespace_import' => true,
'mb_str_functions' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'no_extra_blank_lines' => false,
'native_constant_invocation' => true,
'no_unset_on_property' => false,
'nullable_type_declaration_for_default_null_value' => true,
'operator_linebreak' => ['position' => 'beginning', 'only_booleans' => false],
'ordered_class_elements' => ['sort_algorithm' => 'alpha'],
'ordered_imports' => ['imports_order' => ['const', 'class', 'function']],
'ordered_interfaces' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'phpdoc_line_span' => ['const' => 'single', 'property' => 'single'],
'phpdoc_order' => false, // behavior difference between PHPunit 8 & 9
'phpdoc_tag_casing' => true,
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
'php_unit_test_class_requires_covers' => false,
'psr_autoloading' => ['dir' => 'src'],
'regular_callable_call' => true,
'simplified_if_return' => true,
'simplified_null_return' => true,
'static_lambda' => true,
'trailing_comma_in_multiline' => true,
'yoda_style' => ['equal' => false, 'identical' => false],
])
->setFinder($finder)
->setRiskyAllowed(true);