-
Notifications
You must be signed in to change notification settings - Fork 4
/
.php-cs-fixer.php
55 lines (55 loc) · 1.95 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
<?php
$finder = new PhpCsFixer\Finder();
$finder
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
;
return (new PhpCsFixer\Config())
//->setUsingCache(false)
->setRiskyAllowed(true)
//->setIndent(" ")
//->setLineEnding("CRLF")
//->setLineEnding("\r\n")
//->setLineEnding(PHP_EOL)
->setFinder($finder)
->setCacheFile(__DIR__.'/var/cache/.php_cs.cache')
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'align_multiline_comment' => [
'comment_type' => 'phpdocs_like',
],
'array_indentation' => true,
'array_syntax' => [
'syntax' => 'short'
],
'binary_operator_spaces' => [
'default' => 'align'
],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => false,
'concat_space' => [
'spacing' => 'one'
],
'linebreak_after_opening_tag' => true,
'mb_str_functions' => true,
'no_php4_constructor' => true,
'native_function_invocation' => true,
'no_superfluous_phpdoc_tags' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => true,
'php_unit_strict' => true,
'phpdoc_order' => true,
'semicolon_after_instruction' => true,
'strict_comparison' => true,
'strict_param' => true,
])
;