forked from symfony/ux
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
33 lines (31 loc) · 1.04 KB
/
.php-cs-fixer.dist.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
if (!file_exists(__DIR__.'/src')) {
exit(0);
}
return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHPUnit75Migration:risky' => true,
'php_unit_dedicate_assert' => ['target' => '5.6'],
'array_syntax' => ['syntax' => 'short'],
'fopen_flags' => false,
'protected_to_private' => false,
'native_constant_invocation' => true,
'combine_nested_dirname' => true,
'list_syntax' => ['syntax' => 'short'],
'ordered_imports' => [
'imports_order' => ['const', 'class', 'function'],
],
])
->setRiskyAllowed(true)
->setFinder(
PhpCsFixer\Finder::create()
->in([__DIR__.'/src', __DIR__.'/ux.symfony.com/src'])
->append([__FILE__])
->notPath('#/Fixtures/#')
->notPath('#/app/var/#')
->notPath('#/var/cache/#')
->notPath('Turbo/Attribute/Broadcast.php') // Need https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/4702
)
;