forked from leomarquine/php-etl
-
Notifications
You must be signed in to change notification settings - Fork 11
/
.php-cs-fixer.dist.php
41 lines (35 loc) · 1.12 KB
/
.php-cs-fixer.dist.php
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);
$finder = PhpCsFixer\Finder::create()
->exclude('vendor')
->in(__DIR__)
;
$customRules = [
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'increment_style' => ['style' => 'post'],
'declare_strict_types' => true,
'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_trait_insert_per_statement' => true,
];
$config = new PhpCsFixer\Config();
$config->setRules($customRules + $psr12Rules)
->setFinder($finder);
return $config;