-
-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
23 lines (20 loc) · 1001 Bytes
/
.php-cs-fixer.php
File metadata and controls
23 lines (20 loc) · 1001 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in([__DIR__ . '/src', __DIR__ . '/tests']);
return (new PhpCsFixer\Config())
->setRules([
'@PER-CS2.0' => true,
'binary_operator_spaces' => ['default' => 'single_space'],
'blank_line_after_opening_tag' => true,
'declare_strict_types' => true,
'fully_qualified_strict_types' => ['import_symbols' => true],
'global_namespace_import' => ['import_classes' => true, 'import_constants' => false, 'import_functions' => false],
'no_extra_blank_lines' => ['tokens' => ['attribute', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'square_brace_block', 'switch']],
'no_unused_imports' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'phpdoc_line_span' => ['property' => 'single', 'method' => 'single'],
'single_quote' => true,
])
->setFinder($finder)
->setRiskyAllowed(true);