-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
34 lines (31 loc) · 955 Bytes
/
.php-cs-fixer.php
File metadata and controls
34 lines (31 loc) · 955 Bytes
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
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
$finder = (new Finder())
->in([
__DIR__.'/src',
__DIR__.'/tests',
]);
return (new Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setRules([
'declare_strict_types' => true,
'new_with_braces' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_align' => true,
'phpdoc_indent' => true,
'phpdoc_to_comment' => false,
'align_multiline_comment' => ['comment_type' => 'phpdocs_only'],
'concat_space' => ['spacing' => 'one'],
'return_type_declaration' => true,
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
],
'types_spaces' => [
'space' => 'single',
],
])
->setRiskyAllowed(true)
->setFinder($finder);