forked from php/web-php
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.php
43 lines (38 loc) · 1.2 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
39
40
41
42
43
<?php
$finder = PhpCsFixer\Finder::create()->in(__DIR__);
$config = new PhpCsFixer\Config();
$finder = $config->getFinder()
->ignoreDotFiles(false)
->in(__DIR__)
->exclude('manual/en/')
->name('*.inc')
->name('.php-cs-fixer.php')
->notPath('include/last_updated.inc')
->notPath('include/pregen-confs.inc')
->notPath('include/pregen-news.inc')
->notPath('include/releases.inc')
->notPath('tests/run-tests.php');
$config
->setRiskyAllowed(true)
->setRules([
'array_indentation' => true,
'array_syntax' => true,
'binary_operator_spaces' => true,
'class_attributes_separation' => true,
'concat_space' => [
'spacing' => 'one',
],
'constant_case' => true,
'indentation_type' => true,
'line_ending' => true,
'no_extra_blank_lines' => true,
'no_trailing_whitespace' => true,
'ordered_class_elements' => true,
'single_space_after_construct' => true,
'strict_param' => true,
'switch_case_space' => true,
'trim_array_spaces' => true,
'visibility_required' => true,
'whitespace_after_comma_in_array' => true,
]);
return $config;