-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs
49 lines (45 loc) · 1.22 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
<?php
$header = <<<'EOF'
This file is part of toolkit/fsutil.
@author https://github.com/inhere
@link https://github.com/toolkit/fsutil
@license MIT
EOF;
$rules = [
'@PSR2' => true,
'array_syntax' => [
'syntax' => 'short'
],
'list_syntax' => [
'syntax' => 'short'
],
'class_attributes_separation' => true,
'declare_strict_types' => true,
'global_namespace_import' => [
'import_constants' => true,
'import_functions' => true,
],
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'separate' => 'bottom'
],
'no_unused_imports' => true,
'return_type_declaration' => [
'space_before' => 'none',
],
'single_quote' => true,
'standardize_not_equals' => true,
'void_return' => true, // add :void for method
];
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules($rules)
->setFinder(
PhpCsFixer\Finder::create()
// ->exclude('test')
->exclude('runtime')
->exclude('vendor')
->in(__DIR__)
)
->setUsingCache(false);