-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
56 lines (54 loc) · 1.62 KB
/
.php-cs-fixer.dist.php
File metadata and controls
56 lines (54 loc) · 1.62 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
<?php
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('var')
->notPath('config/reference.php')
;
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP8x4Migration' => true,
'declare_strict_types' => true,
'no_redundant_readonly_property' => true,
'modernize_types_casting' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'remove_inheritdoc' => true,
],
'class_attributes_separation' => [
'elements' => [
'const' => 'one',
'method' => 'one',
'property' => 'one',
'trait_import' => 'none',
],
],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'ordered_imports' => [
'sort_algorithm' => 'alpha',
'imports_order' => ['class', 'function', 'const'],
],
'yoda_style' => [
'always_move_variable' => true,
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
'phpdoc_to_comment' => false,
'native_function_invocation' => [
'include' => ['@compiler_optimized'],
'scope' => 'namespaced',
'strict' => true,
],
'native_constant_invocation' => true,
'strict_param' => true,
'strict_comparison' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
;