-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.php_cs
63 lines (61 loc) · 2.07 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
<?php
/**
* Created on : 2018-04-23 20:24:25 Mon
* Encoding : UTF-8
* Description: php-cs-fixer format config
*
* @author @qii404 <qii404.me>
*/
$config = PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'braces' => true,
'align_multiline_comment' => true,
'array_indentation' => true,
'blank_line_after_namespace' => true,
'blank_line_before_return' => true,
'blank_line_after_opening_tag' => true,
'class_attributes_separation' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_phpdoc' => true,
'phpdoc_indent' => true,
'phpdoc_align' => true,
'phpdoc_order' => true,
'phpdoc_separation' => true,
'phpdoc_trim' => true,
'phpdoc_types' => true,
'combine_consecutive_unsets' => true,
'declare_equal_normalize' => true,
'elseif' => true,
'lowercase_constants' => true,
'lowercase_keywords' => true,
'method_argument_space' => true,
'method_separation' => true,
'new_with_braces' => true,
'cast_spaces' => true,
'no_blank_lines_after_class_opening' => true,
'no_empty_statement' => true,
'no_leading_namespace_whitespace' => true,
'no_trailing_whitespace' => true,
'no_whitespace_before_comma_in_array' => true,
'phpdoc_scalar' => true,
'single_blank_line_before_namespace' => true,
'single_line_after_imports' => true,
'single_quote' => true,
'trailing_comma_in_multiline_array' => true,
'array_syntax' => ['syntax' => 'short'],
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
'array_indentation' => true,
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true],
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('tests/')
->exclude('vendor/')
->in(__DIR__)
)
->setUsingCache(true)
->setCacheFile('.php_cs.cache')
;
return $config;