-
Notifications
You must be signed in to change notification settings - Fork 34
/
.php-cs-fixer.php
38 lines (34 loc) · 1.11 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
34
35
36
37
38
<?php
$finder = ( new PhpCsFixer\Finder() )->in( __DIR__ );
$rules = array(
// Keep these rules for sure.
'phpdoc_order' => array(
'order' => array( 'since', 'param', 'throws', 'return' ),
),
'phpdoc_scalar' => true,
'phpdoc_trim' => true,
'phpdoc_var_without_name' => true,
'phpdoc_indent' => true,
'align_multiline_comment' => true,
'short_scalar_cast' => true,
'standardize_not_equals' => true,
'echo_tag_syntax' => true,
'semicolon_after_instruction' => true,
'no_useless_else' => true,
'no_superfluous_elseif' => true,
'phpdoc_types_order' => array(
'null_adjustment' => 'always_last',
),
);
$config = new PhpCsFixer\Config();
$config->setRules( $rules );
return $config->setFinder( $finder );
// Maybe include these.
// 'phpdoc_separation' => true,
// 'phpdoc_summary' => true,
// 'phpdoc_align' => true,
// 'visibility_required' => true,
// 'multiline_comment_opening_closing' => true,
// 'phpdoc_types_order' => true,
// 'return_assignment' => true,
// 'static_lambda' => true,