-
Notifications
You must be signed in to change notification settings - Fork 3
/
.php-cs-fixer.dist.php
56 lines (53 loc) · 4.37 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
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
])
;
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setFinder($finder)
->setRules([
'@PSR12' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHP80Migration:risky' => true,
'@PHP81Migration' => true,
'binary_operator_spaces' => ['operators' => \array_fill_keys(['=', '=>', '??=', '.=', '+=', '-=', '*=', '/=', '%=', '**=', '&=', '|=', '^=', '<<=', '>>='], 'align_single_space_minimal')],
'blank_line_before_statement' => ['statements' => ['break', 'case', 'continue', 'declare', 'default', 'do', 'exit', 'for', 'foreach', 'goto', 'if', 'include', 'include_once', 'phpdoc', 'require', 'require_once', 'return', 'switch', 'throw', 'try', 'while', 'yield', 'yield_from']],
'class_definition' => ['multi_line_extends_each_single_line' => true, 'single_item_single_line' => true],
'concat_space' => ['spacing' => 'one'],
'date_time_create_from_format_call' => true,
'date_time_immutable' => true,
'declare_strict_types' => true,
'final_class' => true,
'get_class_to_class_keyword' => true,
'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true],
'increment_style' => ['style' => 'post'],
'mb_str_functions' => true,
'modernize_strpos' => true,
'native_constant_invocation' => true,
'native_function_invocation' => ['include' => ['@all']],
'nullable_type_declaration_for_default_null_value' => true,
'ordered_imports' => ['imports_order' => ['class', 'const', 'function'], 'sort_algorithm' => 'alpha'],
'ordered_interfaces' => ['direction' => 'ascend', 'order' => 'alpha'],
'ordered_types' => ['sort_algorithm' => 'none', 'null_adjustment' => 'always_last'],
'phpdoc_align' => ['align' => 'left'],
'phpdoc_line_span' => true,
'phpdoc_order_by_value' => ['annotations' => ['author', 'covers', 'coversNothing', 'dataProvider', 'depends', 'group', 'internal', 'method', 'mixin', 'property', 'property-read', 'property-write', 'requires', 'throws', 'uses']],
'phpdoc_separation' => ['groups' => [['deprecated', 'link', 'see', 'since'], ['author', 'copyright', 'license'], ['category', 'package', 'subpackage'], ['property', 'phpstan-property', 'property-read', 'phpstan-property-read', 'property-write', 'phpstan-property-write'], ['param', 'phpstan-param'], ['return', 'phpstan-return']]],
'phpdoc_to_comment' => false,
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
'regular_callable_call' => true,
'self_static_accessor' => true,
'simplified_if_return' => true,
'single_quote' => ['strings_containing_single_quote_chars' => true],
'standardize_increment' => false,
'static_lambda' => true,
'strict_comparison' => true,
'strict_param' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'match', 'parameters']],
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
])
;