-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.php
54 lines (52 loc) · 1.95 KB
/
.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
declare(strict_types=1);
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'declare_strict_types' => true,
'phpdoc_align' => false,
'phpdoc_summary' => false,
'phpdoc_to_comment' => false,
'concat_space' => ['spacing' => 'one'],
'header_comment' => ['header' => '', 'separate' => 'both'],
'multiline_whitespace_before_semicolons' => false,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => [
'sort_algorithm' => 'alpha',
'imports_order' => ['class', 'function', 'const'],
],
'phpdoc_order' => true,
'array_syntax' => ['syntax' => 'short'],
'echo_tag_syntax' => ['format' => 'long'],
'php_unit_method_casing' => false,
'php_unit_set_up_tear_down_visibility' => true,
'php_unit_internal_class' => true,
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'final_internal_class' => false,
'increment_style' => ['style' => 'pre'],
'return_type_declaration' => ['space_before' => 'none'],
'trailing_comma_in_multiline' => ['elements' => ['arrays', 'arguments', 'parameters']],
'global_namespace_import' => ['import_classes' => true, 'import_constants' => false, 'import_functions' => false],
'void_return' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
],
'class_definition' => [
'multi_line_extends_each_single_line' => true,
],
'single_line_throw' => false,
'compact_nullable_typehint' => true,
])
->setFinder(
PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php'),
);