-
Notifications
You must be signed in to change notification settings - Fork 37
/
.php-cs-fixer.php
35 lines (31 loc) · 987 Bytes
/
.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
<?php
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
$config = new PhpCsFixer\Config();
$config->setRiskyAllowed(true);
$config->setRules([
'@PSR2' => true,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'@PHP56Migration:risky' => true,
'@PHPUnit57Migration:risky' => true,
'fopen_flags' => true,
'linebreak_after_opening_tag' => true,
'native_constant_invocation' => false,
'native_function_invocation' => [
"strict" => false,
],
'blank_line_before_statement' => ['statements' => ['break', 'case', 'continue', 'declare', 'default', 'exit', 'goto', 'return', 'switch', 'throw', 'try']],
'concat_space' => ['spacing' => 'one'],
'visibility_required' => false,
'no_null_property_initialization' => false,
'static_lambda' => false,
]);
$config->setFinder($finder);
return $config;