-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
81 lines (66 loc) · 1.7 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
declare(strict_types=1);
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$rules = [
'@PER' => true,
'@Symfony' => true,
'declare_strict_types' => true,
// Override @Symfony
'phpdoc_align' => [
'align' => 'left',
'tags' => [
'method',
'param',
'property',
'property-read',
'property-write',
'return',
'throws',
'type',
'var',
],
],
'phpdoc_separation' => [
'groups' => [
// Defaults
['deprecated', 'link', 'see', 'since'],
['author', 'copyright', 'license'],
['category', 'package', 'subpackage'],
['property', 'property-read', 'property-write'],
// Overrides
['template', 'template-covariant', 'template-uses'],
['uses'],
['phpstan-*'], // This is not available... yet.
['phpstan-param', 'phpstan-return'],
],
],
'global_namespace_import' => [
'import_classes' => null,
'import_constants' => true,
'import_functions' => true,
],
'no_empty_comment' => false,
'php_unit_method_casing' => ['case' => 'snake_case'],
'single_line_throw' => false,
'yoda_style' => false,
'phpdoc_to_comment' => [
'ignored_tags' => [
'array',
'var',
'phpstan-var',
],
],
];
$finder = Finder::create()
->in([
__DIR__.'/src',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return (new Config())
->setFinder($finder)
->setRules($rules)
->setRiskyAllowed(true)
->setUsingCache(true);