Repository navigation
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
73 lines (67 loc) · 2.3 KB
/
Copy path.php-cs-fixer.php
File metadata and controls
73 lines (67 loc) · 2.3 KB
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
63
64
65
66
67
68
69
70
71
72
73
<?php
/*
* This file is part of JoliCode's json-ld project.
*
* (c) jolicode.com <coucou@jolicode.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
$header = <<<'EOF'
This file is part of JoliCode's json-ld project.
(c) jolicode.com <coucou@jolicode.com>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
$finder = PhpCsFixer\Finder::create()
->ignoreVCSIgnored(true)
->ignoreDotFiles(false)
->in(__DIR__)
->append([
__FILE__,
])
;
return (new PhpCsFixer\Config())
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'header_comment' => ['header' => $header],
'array_syntax' => ['syntax' => 'short'],
'ordered_class_elements' => true,
'ordered_imports' => true,
'heredoc_to_nowdoc' => true,
'php_unit_strict' => [
'assertions' => [
'assertAttributeEquals',
'assertAttributeNotEquals',
],
],
'php_unit_construct' => true,
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_order' => true,
'strict_comparison' => true,
'strict_param' => true,
'no_extra_blank_lines' => [
'tokens' => [
'break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block',
],
],
'echo_tag_syntax' => true,
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'semicolon_after_instruction' => true,
'combine_consecutive_unsets' => true,
'blank_line_before_statement' => [
'statements' => [
'break', 'continue', 'declare', 'foreach', 'if', 'return', 'throw', 'try', 'while',
],
],
'concat_space' => ['spacing' => 'one'],
'trailing_comma_in_multiline' => ['elements' => ['arguments', 'parameters', 'arrays']],
'multiline_promoted_properties' => true,
])
->setFinder($finder)
;