-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
62 lines (54 loc) · 2.1 KB
/
.php_cs.dist
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
59
60
61
62
<?php
/*
* This file is part of the Where2 PHP Address Parser.
* Source: https://github.com/michaelbutler/where2
*
* Where2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Where2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with Where2. If not, see <https://www.gnu.org/licenses/>.
*/
$header = <<<'EOF'
This file is part of the Where2 PHP Address Parser.
Source: https://github.com/michaelbutler/where2
Where2 is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Where2 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with Where2. If not, see <https://www.gnu.org/licenses/>.
EOF;
$finder = PhpCsFixer\Finder::create()
->exclude('tests/Data')
->in([
'./src',
'./tests',
])
->append([__DIR__ . '/.php_cs.dist'])
;
$config = PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'@PhpCsFixer' => true,
'protected_to_private' => false,
'final_internal_class' => false,
'header_comment' => ['header' => $header],
'list_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
])
->setRiskyAllowed(false)
->setFinder($finder)
;
return $config;