-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
28 lines (25 loc) · 922 Bytes
/
.php-cs-fixer.dist.php
File metadata and controls
28 lines (25 loc) · 922 Bytes
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
<?php
declare(strict_types=1);
$finder = new PhpCsFixer\Finder()
->in([__DIR__.'/src', __DIR__.'/tests'])
->name('*.php');
return new PhpCsFixer\Config()
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'@Symfony' => true,
'@Symfony:risky' => true,
'@PHP84Migration' => true,
'declare_strict_types' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => false,
'import_functions' => false,
],
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'ordered_imports' => ['sort_algorithm' => 'alpha'],
// Snake-case test methods read like sentences ("it_rejects_blank_input").
'php_unit_method_casing' => ['case' => 'snake_case'],
])
->setFinder($finder)
->setCacheFile(__DIR__.'/var/cache/.php-cs-fixer.cache');