-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.php
46 lines (44 loc) · 1.43 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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('var')
->exclude('vendor')
->exclude('public/bundles')
->exclude('public/css')
->exclude('public/fonts')
->exclude('public/js');
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PSR12' => true,
'@PSR12:risky' => true,
'blank_line_before_statement' => [
'statements' => [
'continue',
'do',
'exit',
'goto',
'if',
'return',
'switch',
'throw',
'try',
],
],
'declare_strict_types' => true,
'global_namespace_import' => ['import_classes' => true, 'import_constants' => true, 'import_functions' => true],
'php_unit_internal_class' => false,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'php_unit_test_class_requires_covers' => false,
'phpdoc_to_comment' => false,
'phpdoc_order_by_value' => ['annotations' => ['throws']],
'yoda_style' => true,
'trailing_comma_in_multiline' => [
'after_heredoc' => true,
'elements' => ['arrays', 'arguments', 'parameters']
],
])
->setFinder($finder)
->setCacheFile(__DIR__.'/.php-cs-fixer.cache');