forked from Superbalist/laravel-prometheus-exporter
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.php_cs
66 lines (66 loc) · 2.01 KB
/
.php_cs
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
<?php
$finder = PhpCsFixer\Finder::create()
->files()
->name('*.php')
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
;
return PhpCsFixer\Config::create()
->setUsingCache(true)
->setRiskyAllowed(true)
->setRules([
// default rules
'@PSR2' => true,
// Alias
// ArrayNotation
'array_syntax' => ['syntax' => 'short'],
'trailing_comma_in_multiline_array' => true,
// Basic
// Casing
// CastNotation
'cast_spaces' => true,
// ClassNotation
// Comment
'no_empty_comment' => true,
// ControlStructure
'no_useless_else' => true,
// DoctrineAnnotation
// FunctionNotation
'return_type_declaration' => ['space_before' => 'one'],
// Import
'no_leading_import_slash' => true,
'no_unused_imports' => true,
'ordered_imports' => true,
// LanguageConstruct
'declare_equal_normalize' => ['space' => 'single'],
'dir_constant' => true,
// ListNotation
// NamespaceNotation
// Naming
'no_homoglyph_names' => true,
// Operator
'binary_operator_spaces' => true,
'concat_space' => ['spacing' => 'one'],
// PhpTag
'blank_line_after_opening_tag' => true,
// PhpUnit
// Phpdoc
'phpdoc_align' => true,
'no_empty_phpdoc' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'],
// ReturnNotation
// Semicolon
'no_empty_statement' => true,
// Strict
// StringNotation
// Whitespace
'blank_line_before_statement' => ['statements' => ['declare', 'return']],
'method_chaining_indentation' => true,
'no_extra_consecutive_blank_lines' => true,
'no_spaces_around_offset' => true,
'no_whitespace_in_blank_line' => true,
])
->setFinder($finder)
;