-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
45 lines (39 loc) · 1.25 KB
/
.php_cs.dist
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
<?php
declare(strict_types=1);
/**
* @var iterable<string> $finder
*/
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__);
$customRules = [
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => true,
'new_with_braces' => false,
'phpdoc_summary' => false,
];
$psr12Rules = [
'@PSR2' => true,
'blank_line_after_opening_tag' => true,
'braces' => ['allow_single_line_closure' => true],
'compact_nullable_typehint' => true,
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => ['space' => 'none'],
'function_typehint_space' => true,
'new_with_braces' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'no_empty_statement' => true,
'no_leading_import_slash' => true,
'no_leading_namespace_whitespace' => true,
'no_whitespace_in_blank_line' => true,
'return_type_declaration' => ['space_before' => 'none'],
'single_space_after_construct' => false,
'single_trait_insert_per_statement' => true,
];
$config = new PhpCsFixer\Config();
$config->setRiskyAllowed(true)
->setRules($customRules + $psr12Rules)
->setFinder($finder);
return $config;