-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
.php-cs-fixer.dist.php
60 lines (59 loc) · 1.84 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php
return (new PhpCsFixer\Config())
->setFinder(
\Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/examples',
__DIR__ . '/tests',
])
->name('*.php')
)
->setRiskyAllowed(true)
->setRules([
'@PSR2' => true,
'align_multiline_comment' => true,
'array_indentation' => true,
'declare_strict_types' => true,
'final_class' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'list_syntax' => [
'syntax' => 'short',
],
'constant_case' => [
'case' => 'lower',
],
'multiline_comment_opening_closing' => true,
'native_function_casing' => true,
'no_empty_phpdoc' => true,
'no_leading_import_slash' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
],
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => [
'imports_order' => ['class', 'function', 'const'],
],
'ordered_interfaces' => true,
'php_unit_test_annotation' => true,
'php_unit_test_case_static_method_calls' => [
'call_type' => 'static',
],
'php_unit_method_casing' => [
'case' => 'snake_case',
],
'single_import_per_statement' => true,
'single_trait_insert_per_statement' => true,
'static_lambda' => true,
'strict_comparison' => true,
'strict_param' => true,
'native_function_invocation' => true,
'nullable_type_declaration_for_default_null_value' => true,
])
;