-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.php-cs-fixer.php
50 lines (47 loc) · 1.94 KB
/
.php-cs-fixer.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
<?php
declare(strict_types=1);
$finder = (new PhpCsFixer\Finder())
->in(['src', 'tests'])
->exclude([
'var',
'vendor',
])
;
return (new PhpCsFixer\Config())
->setRules([
'@PER-CS1.0' => true,
'@PER-CS1.0:risky' => true,
'@PHP80Migration:risky' => true,
'@PHP82Migration' => true,
'no_superfluous_phpdoc_tags' => true,
'single_line_throw' => false,
'concat_space' => ['spacing' => 'one'],
'ordered_imports' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'native_constant_invocation' => false,
'native_function_invocation' => false,
'modernize_types_casting' => true,
'is_null' => true,
'array_syntax' => [
'syntax' => 'short',
],
'final_public_method_for_abstract_class' => true,
'phpdoc_annotation_without_dot' => false,
'phpdoc_summary' => false,
'logical_operators' => true,
'class_definition' => false,
'binary_operator_spaces' => ['operators' => ['=>' => 'align_single_space_minimal', '=' => 'align_single_space_minimal']],
'declare_strict_types' => true,
'yoda_style' => false,
'no_unused_imports' => true,
'use_arrow_functions' => false,
'nullable_type_declaration_for_default_null_value' => true,
])
->setFinder($finder)
->setRiskyAllowed(true)
->setCacheFile(__DIR__ . '/var/.php_cs.cache')
;