-
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
40 lines (37 loc) · 1.29 KB
/
.php-cs-fixer.dist.php
File metadata and controls
40 lines (37 loc) · 1.29 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
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return new PhpCsFixer\Config()
->setRules([
'@PSR12' => true,
'@PHP84Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_namespace' => true,
'blank_line_after_opening_tag' => true,
'declare_strict_types' => true,
'no_unused_imports' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'single_quote' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']],
'no_empty_statement' => true,
'no_extra_blank_lines' => true,
'no_trailing_whitespace' => true,
'no_whitespace_in_blank_line' => true,
'return_type_declaration' => ['space_before' => 'none'],
'visibility_required' => ['elements' => ['method', 'property']],
'native_function_invocation' => [
'include' => ['@compiler_optimized'],
'scope' => 'namespaced',
],
])
->setFinder($finder)
->setRiskyAllowed(true)
->setUsingCache(true)
->setCacheFile(__DIR__ . '/.php-cs-fixer.cache');