-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.php
38 lines (32 loc) · 1010 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
36
37
38
<?php
declare(strict_types=1);
use AffordableMobiles\PhpCsFixer\Fixer\Operator\NotEmptyTernaryToNullCoalescingFixer;
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
require_once __DIR__.'/vendor/autoload.php';
$finder = Finder::create()
->ignoreDotFiles(false)
->ignoreVCSIgnored(true)
->in(__DIR__)
;
$config = new Config();
$config
->registerCustomFixers([
new NotEmptyTernaryToNullCoalescingFixer(),
])
->setRiskyAllowed(true)
->setRules([
'@PHP83Migration' => true,
'@PHP80Migration:risky' => true,
'heredoc_indentation' => false,
'@PhpCsFixer' => true,
'@PhpCsFixer:risky' => true,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
'binary_operator_spaces' => [
'default' => 'align',
],
'AffordableMobiles/not_empty_ternary_to_null_coalescing' => true,
])
->setFinder($finder)
;
return $config;