forked from alpshq/craft-share-previews
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php_cs.php
55 lines (53 loc) · 1.67 KB
/
.php_cs.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
<?php
$finder = PhpCsFixer\Finder::create()
->notPath('vendor/')
->notPath('storage')
->notPath('tests/_support/')
->in(__DIR__)
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return (new PhpCsFixer\Config)
->setRules([
'@Symfony' => true,
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
// 'binary_operator_spaces' => ['operators' => false],
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
'property' => 'one',
'const' => 'one',
],
],
'compact_nullable_typehint' => true,
'concat_space' => ['spacing' => 'one'],
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'self_static_accessor' => true,
'fully_qualified_strict_types' => true,
'single_line_comment_style' => true,
'linebreak_after_opening_tag' => true,
'list_syntax' => [
'syntax' => 'short',
],
'new_with_braces' => false,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'allow_unused_params' => false,
'remove_inheritdoc' => true,
],
'not_operator_with_successor_space' => true,
'ordered_imports' => true,
'phpdoc_add_missing_param_annotation' => [
'only_untyped' => true,
],
'phpdoc_line_span' => [
'property' => 'single',
'const' => 'single',
],
'phpdoc_order' => true,
'single_line_throw' => false,
'yoda_style' => false,
])
->setFinder($finder);