-
Notifications
You must be signed in to change notification settings - Fork 17
/
.php-cs-fixer.php
48 lines (45 loc) · 1.49 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
<?php
$header = <<<'EOF'
This file is part of PHP Nominatim.
(c) Maxime Hélias <[email protected]>
This source file is subject to the MIT license that is bundled
with this source code in the file LICENSE.
EOF;
$finder = (new PhpCsFixer\Finder())
->in(__DIR__ . '/examples')
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
;
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHP74Migration:risky' => true,
'@PHPUnit84Migration:risky' => true,
'date_time_immutable' => true,
'general_phpdoc_annotation_remove' => [
'annotations' => [
'expectedException',
'expectedExceptionMessage',
'expectedExceptionMessageRegExp'
]
],
'global_namespace_import' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
'location' => 'after_declare_strict'
],
'linebreak_after_opening_tag' => true,
'list_syntax' => ['syntax' => 'short'],
'mb_str_functions' => true,
'nullable_type_declaration_for_default_null_value' => true,
'ordered_interfaces' => true,
'php_unit_strict' => false,
'phpdoc_line_span' => true,
'self_static_accessor' => true,
'simplified_null_return' => true,
])
->setFinder($finder)
->setCacheFile(__DIR__.'/.php_cs.cache');