-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
33 lines (30 loc) · 1.09 KB
/
Copy path.php-cs-fixer.php
File metadata and controls
33 lines (30 loc) · 1.09 KB
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
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
// Migration fixtures are deliberately formatted to match what
// iManager 1.x's `var_export()` actually emits (long-array syntax,
// no strict_types, var_export-style spacing). Don't reformat them.
->notPath('Fixtures/v1')
->append([__DIR__ . '/bin/imanager']);
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PSR12' => true,
'@PSR12:risky' => true,
'@PER-CS' => true,
'declare_strict_types' => true,
'array_syntax' => ['syntax' => 'short'],
'no_unused_imports' => true,
'ordered_imports' => true,
'single_quote' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']],
'native_function_invocation' => ['include' => ['@compiler_optimized']],
'phpdoc_align' => true,
'phpdoc_separation' => true,
])
->setFinder($finder)
->setCacheFile(__DIR__ . '/.php-cs-fixer.cache');