-
Notifications
You must be signed in to change notification settings - Fork 74
/
.php-cs-fixer.php
54 lines (47 loc) · 1.67 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
<?php
declare(strict_types=1);
/*
* This file is part of the Arnapou json-parser package.
*
* (c) Arnaud Buathier <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$header = <<<HEADER
This file is part of the Arnapou jqCron package.
(c) Arnaud Buathier <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
HEADER;
$finder = (new PhpCsFixer\Finder())
->in(
[
__DIR__ . '/src',
__DIR__ . '/test_php',
]
);
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules(
[
'@PSR2' => true,
'@PSR12' => true,
'@Symfony' => true,
'@DoctrineAnnotation' => true,
'@PHP80Migration' => true,
'@PHP81Migration' => true,
'@PHP82Migration' => true,
'declare_strict_types' => true,
'concat_space' => ['spacing' => 'one'],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'phpdoc_order' => true,
'phpdoc_var_annotation_correct_order' => true,
'global_namespace_import' => ['import_classes' => true, 'import_functions' => true, 'import_constants' => true],
'header_comment' => ['location' => 'after_declare_strict', 'header' => $header],
]
)
->setFinder($finder);