-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
58 lines (46 loc) · 1.53 KB
/
.php-cs-fixer.dist.php
File metadata and controls
58 lines (46 loc) · 1.53 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
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
$finder = Finder::create()
->in([__DIR__ . '/src', __DIR__ . '/tests'])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return (new Config())
->setRiskyAllowed(true)
->setParallelConfig(ParallelConfigFactory::detect())
->setRules([
'@PSR12' => true,
'heredoc_indentation' => ['indentation' => 'same_as_start'],
'operator_linebreak' => ['position' => 'beginning'],
'cast_spaces' => ['space' => 'single'],
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'function_declaration' => [
'closure_function_spacing' => 'one',
'closure_fn_spacing' => 'none',
],
'ordered_imports' => [
'sort_algorithm' => 'alpha',
'imports_order' => [
'class',
'function',
'const',
],
],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'blank_line_before_statement' => true,
'not_operator_with_successor_space' => true,
'single_line_empty_body' => true,
'method_chaining_indentation' => true,
'no_unused_imports' => true,
'single_quote' => true,
'strict_param' => true,
'declare_strict_types' => true,
])
->setFinder($finder);