-
Notifications
You must be signed in to change notification settings - Fork 17
/
.php-cs-fixer.php
33 lines (31 loc) · 1.1 KB
/
.php-cs-fixer.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
<?php
$config = new PhpCsFixer\Config();
return $config
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'blank_line_before_statement' => ['statements' => ['return']],
'cast_spaces' => true,
'class_attributes_separation' => ['elements' => ['method' => 'one']],
'concat_space' => ['spacing' => 'none'],
'declare_strict_types' => true,
'increment_style' => ['style' => 'pre'],
'no_blank_lines_after_class_opening' => true,
'no_spaces_around_offset' => ['positions' => ['inside', 'outside']],
'no_unneeded_control_parentheses' => true,
'no_unused_imports' => true,
'phpdoc_align' => true,
'phpdoc_no_access' => true,
'phpdoc_separation' => true,
'single_quote' => true,
'trim_array_spaces' => true,
'single_blank_line_before_namespace' => true
])
->setFinder(
PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
)
->setRiskyAllowed(true)
;