-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.php_cs.dist
73 lines (69 loc) · 2.08 KB
/
.php_cs.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
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
<?php
namespace Clippings;
use PhpCsFixer\Config;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;
use Symfony\Component\Finder\Finder;
$finder = Finder::create()
->files()
->name('*.php')
->ignoreDotFiles(true)
->ignoreUnreadableDirs(true)
->ignoreVCS(true)
->in([
'src',
'tests',
]);
return Config::create()
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'class_definition' => [
'singleLine' => false,
'singleItemSingleLine' => true,
'multiLineExtendsEachSingleLine' => true,
],
'@PHP70Migration' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'dir_constant' => true,
'ereg_to_preg' => true,
'is_null' => [
'use_yoda_style' => false,
],
'no_php4_constructor' => true,
'no_short_echo_tag' => true,
'no_useless_return' => true,
'ordered_imports' => [
'sortAlgorithm' => OrderedImportsFixer::SORT_ALPHA,
'importsOrder' => [
OrderedImportsFixer::IMPORT_TYPE_CONST,
OrderedImportsFixer::IMPORT_TYPE_FUNCTION,
OrderedImportsFixer::IMPORT_TYPE_CLASS,
],
],
'php_unit_construct' => true,
'php_unit_dedicate_assert' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_order' => true,
'phpdoc_return_self_reference' => [
'this' => '$this',
'@this' => '$this',
'$self' => 'self',
'@self' => 'self',
'$static' => 'static',
'@static' => 'static',
],
'random_api_migration' => true,
'return_type_declaration' => [
'space_before' => 'none',
],
'ternary_to_null_coalescing' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
'less_and_greater' => false,
],
])
->setUsingCache(true)
->setRiskyAllowed(true)
->setFinder($finder);