-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.php
58 lines (50 loc) · 1.72 KB
/
.php-cs-fixer.php
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
<?php
/**
* This file is part of PCCD.
*
* (c) Pere Orga Esteve <[email protected]>
* (c) Víctor Pàmies i Riudor <[email protected]>
*
* This source file is subject to the AGPL license that is bundled with this
* source code in the file LICENSE.
*/
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$header = <<<'EOF'
This file is part of PCCD.
(c) Pere Orga Esteve <[email protected]>
(c) Víctor Pàmies i Riudor <[email protected]>
This source file is subject to the AGPL license that is bundled with this
source code in the file LICENSE.
EOF;
$finder = Finder::create()
->exclude(['node_modules', 'src/third_party', 'tmp'])
->ignoreDotFiles(false)
->in(__DIR__);
$config = new Config();
$config
->setRiskyAllowed(true)
->setRules([
'@PHP82Migration:risky' => true,
'@PHP84Migration' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHPUnit100Migration:risky' => true,
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => false,
'header_comment' => ['header' => $header, 'comment_type' => 'PHPDoc', 'location' => 'after_open'],
'increment_style' => ['style' => 'post'],
'modernize_strpos' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'phpdoc_align' => false,
'phpdoc_annotation_without_dot' => false,
'phpdoc_list_type' => true,
'phpdoc_to_comment' => false,
'php_unit_internal_class' => false,
'php_unit_test_class_requires_covers' => false,
'psr_autoloading' => false,
'random_api_migration' => false,
'yoda_style' => false,
])
->setFinder($finder);
return $config;