-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.php-cs-fixer.dist.php
47 lines (43 loc) · 1.06 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
<?php
use PhpCsFixer\Finder;
use PhpCsFixer\Config;
use PhpCsFixer\FixerInterface;
$excluded_folders = [
'config',
'bootstrap/cache',
'node_modules',
'public',
'resources',
'storage',
'vendor',
];
$rules = [
'@PSR2' => true,
'@Symfony' => true,
'ordered_class_elements' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'linebreak_after_opening_tag' => true,
'no_empty_comment' => false,
'no_superfluous_phpdoc_tags' => false,
'ordered_imports' => true,
'phpdoc_align' => ['align' => 'left'],
'phpdoc_order' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => false,
'import_functions' => false,
],
];
$finder = Finder::create()
->exclude($excluded_folders)
->notPath('server.php')
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
->in(__DIR__);
return (new Config())
->setRules($rules)
->setFinder($finder)
->setUsingCache(true);