-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
41 lines (38 loc) · 1.34 KB
/
.php-cs-fixer.php
File metadata and controls
41 lines (38 loc) · 1.34 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
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
return (new Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setRiskyAllowed(false)
->setRules([
'@PSR12' => true,
'braces' => [
'position_after_functions_and_oop_constructs' => 'same',
'position_after_control_structures' => 'same',
'position_after_anonymous_constructs' => 'same',
],
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'no_closing_tag' => true,
'full_opening_tag' => true,
'lowercase_keywords' => true,
'constant_case' => ['case' => 'lower'],
'no_trailing_whitespace' => true,
'line_ending' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'no_leading_import_slash' => true,
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'keep_multiple_spaces_after_comma' => false,
],
'phpdoc_scalar' => true,
'phpdoc_types_order' => ['null_adjustment' => 'always_last'],
])
->setFinder(
(new Finder())
->in(__DIR__)
->exclude(['vendor', 'node_modules', '.moodle'])
->name('*.php')
);