-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
57 lines (44 loc) · 1.41 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in([__DIR__ . '/_'])
->in([__DIR__ . '/tests'])
;
$config = new PhpCsFixer\Config();
$config->setRules([
'@Symfony' => true,
'@PER-CS' => true,
'php_unit_test_case_static_method_calls' => true,
'declare_strict_types' => true,
'php_unit_strict' => true,
// overwrite some symfony defaults
'blank_line_before_statement' => false,
'self_accessor' => false,
// away you go
'yoda_style' => false,
// multiline dotting
'phpdoc_annotation_without_dot' => true,
'phpdoc_summary' => false,
'phpdoc_to_comment' => false,
// we have long params list on throw
'single_line_throw' => false,
// snake case testmethods
'php_unit_method_casing' => ['case' => 'snake_case'],
// wtf, we need space
'concat_space' => ['spacing' => 'one'],
'global_namespace_import' => ['import_classes' => true, 'import_constants' => false, 'import_functions' => false],
'phpdoc_line_span' => [
'property' => 'single',
'const' => 'single',
'method' => 'multi',
],
// keep closure spaces
'function_declaration' => [
'closure_fn_spacing' => 'one',
],
]);
$config->setFinder($finder);
$config->setRiskyAllowed(true);
$config->setUsingCache(false);
$config->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect());
return $config;