-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php_cs
More file actions
43 lines (39 loc) · 1.21 KB
/
.php_cs
File metadata and controls
43 lines (39 loc) · 1.21 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
<?php
$header = <<<EOF
This file is part of the php-lisp/php-lisp.
@Link https://github.com/php-phphp/phphp
@Document https://github.com/php-phphp/phphp/blob/master/README.md
@Contact itwujunze@gmail.com
@License https://github.com/php-phphp/phphp/blob/master/LICENSE
(c) Panda <itwujunze@gmail.com>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'header_comment' => [
'commentType' => 'PHPDoc',
'header' => $header,
'separate' => 'none'
],
'array_syntax' => [
'syntax' => 'short'
],
'single_quote' => true,
'class_attributes_separation' => true,
'no_unused_imports' => true,
'standardize_not_equals' => true,
'declare_strict_types' => true,
'ordered_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'php_unit_construct' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
)
->setUsingCache(false);