This repository has been archived by the owner on Feb 27, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
php_cs.php.dist
46 lines (44 loc) · 1.54 KB
/
php_cs.php.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
46
<?php
$finder = PhpCsFixer\Finder::create()
->name('*.php')
->in(__DIR__ . DIRECTORY_SEPARATOR . 'app')
->in(__DIR__ . DIRECTORY_SEPARATOR . 'config')
->in(__DIR__ . DIRECTORY_SEPARATOR . 'database')
->in(__DIR__ . DIRECTORY_SEPARATOR . 'routes')
->in(__DIR__ . DIRECTORY_SEPARATOR . 'tests');
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'list_syntax' => ['syntax' => 'short'],
'array_syntax' => ['syntax' => 'short'],
'strict_param' => true,
'phpdoc_order' => true,
'ordered_imports' => ['sortAlgorithm' => 'length'],
'no_unused_imports' => true,
'method_argument_space' => ['ensure_fully_multiline' => true],
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'property_public',
'property_protected',
'property_private',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected',
'method_private'
],
'sortAlgorithm' => 'none'
],
'align_multiline_comment' => ['comment_type' => 'all_multiline'],
'trailing_comma_in_multiline_array' => true,
'phpdoc_annotation_without_dot' => true,
])
->setFinder($finder);