-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs
85 lines (82 loc) · 2.7 KB
/
.php_cs
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
75
76
77
78
79
80
81
82
83
84
85
<?php
$header = <<<EOF
This file is part of the lihq1403/web3-helper.
(c) lihq1403 <lihaiqing1994@163.com>
This source file is subject to the MIT license that is bundled.
EOF;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@DoctrineAnnotation' => true,
'@PhpCsFixer' => true,
'header_comment' => [
'commentType' => 'PHPDoc',
'header' => $header,
'separate' => 'none',
'location' => 'after_declare_strict',
],
'array_syntax' => [
'syntax' => 'short',
],
'list_syntax' => [
'syntax' => 'short',
],
'concat_space' => [
'spacing' => 'one',
],
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => false,
],
'blank_line_before_statement' => [
'statements' => [
'declare',
],
],
'general_phpdoc_annotation_remove' => [
'annotations' => [
'author',
],
],
'list_syntax' => [
'syntax' => 'short',
],
'yoda_style' => [
'always_move_variable' => true,
'equal' => true,
'identical' => true,
],
'multiline_whitespace_before_semicolons' => [
'strategy' => 'no_multi_line',
],
'single_line_comment_style' => [
'comment_types' => ['hash'],
],
'class_attributes_separation' => true,
'combine_consecutive_unsets' => true,
'declare_strict_types' => false,
'linebreak_after_opening_tag' => true,
'lowercase_constants' => true,
'lowercase_static_reference' => true,
'no_useless_else' => true,
'no_unused_imports' => true,
'not_operator_with_successor_space' => false,
'not_operator_with_space' => false,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_strict' => false,
'phpdoc_separation' => false,
'single_quote' => true,
'standardize_not_equals' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('public')
->exclude('resources')
->exclude('config')
->exclude('runtime')
->exclude('vendor')
->in(__DIR__)
)
->setUsingCache(false);