-
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
25 lines (23 loc) · 930 Bytes
/
Copy path.php-cs-fixer.dist.php
File metadata and controls
25 lines (23 loc) · 930 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
<?php
$finder = PhpCsFixer\Finder::create()
->in([__DIR__ . '/src', __DIR__ . '/tests'])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return (new PhpCsFixer\Config())
->setRiskyAllowed(false)
->setRules([
'@PSR12' => true,
'indentation_type' => false, // tabs
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['default' => 'single_space', 'operators' => ['=>' => 'single_space']],
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments']],
'no_unused_imports' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'concat_space' => ['spacing' => 'one'],
'single_quote' => true,
'phpdoc_align' => ['align' => 'left'],
'phpdoc_to_comment' => false,
])
->setFinder($finder);