forked from phpcfdi/xml-cancelacion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
52 lines (49 loc) · 1.78 KB
/
.php-cs-fixer.dist.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
<?php
/**
* @noinspection PhpUndefinedClassInspection
* @noinspection PhpUndefinedNamespaceInspection
* @see https://cs.symfony.com/doc/ruleSets/
* @see https://cs.symfony.com/doc/rules/
*/
declare(strict_types=1);
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setCacheFile(__DIR__ . '/build/php_cs.cache')
->setRules([
'@PSR12' => true,
'@PSR12:risky' => true,
'@PHP71Migration:risky' => true,
'@PHP73Migration' => true,
// PSR12 (remove when php-cs-fixer reaches ^3.1.1)
'class_definition' => ['space_before_parenthesis' => true],
// symfony
// 'class_attributes_separation' => true, // conflict with PSR12
'whitespace_after_comma_in_array' => true,
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'function_typehint_space' => true,
'no_blank_lines_after_phpdoc' => true,
'object_operator_without_whitespace' => true,
'binary_operator_spaces' => true,
'phpdoc_scalar' => true,
'no_trailing_comma_in_singleline_array' => true,
'single_quote' => true,
'no_singleline_whitespace_before_semicolons' => true,
'no_unused_imports' => true,
'yoda_style' => ['equal' => true, 'identical' => true, 'less_and_greater' => null],
'standardize_not_equals' => true,
'concat_space' => ['spacing' => 'one'],
'linebreak_after_opening_tag' => true,
// symfony:risky
'no_alias_functions' => true,
'self_accessor' => true,
// contrib
'not_operator_with_successor_space' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__)
->append([__FILE__])
->exclude(['vendor', 'tools', 'build'])
)
;