-
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
74 lines (71 loc) · 1.77 KB
/
.php-cs-fixer.dist.php
File metadata and controls
74 lines (71 loc) · 1.77 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
65
66
67
68
69
70
71
72
73
74
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = (new Finder())
->in(__DIR__ . '/src')
->exclude([
'config/secrets',
'node_modules',
'var',
'docker-data',
])
;
return (new Config())
->setRules([
'@Symfony' => true,
'blank_line_before_statement' => [
'statements' => [
// 'break',
// 'continue',
'declare',
'return',
'throw',
'try',
],
],
'class_definition' => [
'multi_line_extends_each_single_line' => true,
'single_item_single_line' => true,
],
'concat_space' => [
'spacing' => 'one',
],
'declare_strict_types' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'native_constant_invocation' => [
'include' => [
'@all',
],
],
'native_function_invocation' => [
'exclude' => [
'time',
'sleep',
],
'include' => [
'@all',
],
],
'operator_linebreak' => [
'only_booleans' => true,
'position' => 'end',
],
'ordered_imports' => [
'sort_algorithm' => 'alpha',
'imports_order' => ['class', 'function', 'const'],
],
'phpdoc_align' => [
'align' => 'left',
],
'phpdoc_to_comment' => [
'ignored_tags' => ['var'],
],
'single_line_throw' => false,
])
->setFinder($finder)
->setRiskyAllowed(true)
;