forked from hyperf/hyperf-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cs
48 lines (45 loc) · 1.36 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
<?php
$header = <<<'EOF'
This file is part of Hyperf.
@link https://hyperf.org
@document https://wiki.hyperf.org
@contact group@hyperf.org
@license https://github.com/hyperf-cloud/hyperf/blob/master/LICENSE
EOF;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@DoctrineAnnotation' => true,
'header_comment' => [
'commentType' => 'PHPDoc',
'header' => $header,
'separate' => 'none',
'location' => 'after_declare_strict',
],
'array_syntax' => [
'syntax' => 'short'
],
'class_attributes_separation' => true,
'combine_consecutive_unsets' => true,
'declare_strict_types' => true,
'linebreak_after_opening_tag' => true,
'no_useless_else' => true,
'no_unused_imports' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_strict' => false,
'single_quote' => true,
'standardize_not_equals' => true,
'declare_strict_types' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('public')
->exclude('resources')
->exclude('config')
->exclude('runtime')
->exclude('vendor')
->in(__DIR__)
)
->setUsingCache(false);