forked from Will33ELS/votifier-client-php
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php_cs.dist
57 lines (53 loc) · 1.68 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
<?php
$year = \date('Y');
$header = <<<EOF
Votifier PHP Client
@package VotifierClient
@author Manuele Vaccari <manuele.vaccari@gmail.com>
@copyright Copyright (c) 2017-$year Manuele Vaccari <manuele.vaccari@gmail.com>
@license https://github.com/D3strukt0r/votifier-client-php/blob/master/LICENSE.txt GNU General Public License v3.0
@link https://github.com/D3strukt0r/votifier-client-php
EOF;
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules(
[
'@PSR1' => true,
'@PSR2' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $header,
],
'concat_space' => [
'spacing' => 'one',
],
'ordered_imports' => [
'imports_order' => [
'class',
'const',
'function',
],
],
'no_extra_blank_lines' => [
'tokens' => ['default'],
],
'php_unit_test_case_static_method_calls' => [
'call_type' => 'this',
],
'linebreak_after_opening_tag' => true,
'mb_str_functions' => true,
'no_php4_constructor' => true,
'native_function_invocation' => false,
'no_superfluous_elseif' => false,
]
)
->setFinder($finder)
->setCacheFile(__DIR__ . '/.php_coding_standard_cache.json')
;