-
Notifications
You must be signed in to change notification settings - Fork 0
/
php_cs.dist
49 lines (45 loc) · 1.11 KB
/
php_cs.dist
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
<?php
$finder = (new \PhpCsFixer\Finder)
->path('src')
->path('tests')
->in(__DIR__)
;
$fileHeader =<<<_EOH_
This file is part of the EmperorNortonCommands.
Public domain. All rites reversed.
_EOH_;
return (new \PhpCsFixer\Config)
->setIndent(" ")
->setLineEnding("\n")
->setRules([
'@PSR12' => true,
'@Symfony' => true,
'@PhpCsFixer' => true,
'array_indentation' => true,
'array_syntax' => ['syntax' => 'short'],
'backtick_to_shell_exec' => true,
'concat_space' => ['spacing' => 'one'],
'declare_strict_types' => true,
'dir_constant' => true,
'final_class' => true,
'final_internal_class' => true,
'final_public_method_for_abstract_class' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'header_comment' => [
'comment_type' => 'PHPDoc',
'header' => $fileHeader,
'location' => 'after_open',
'separate' => 'bottom',
],
'indentation_type' => true,
'phpdoc_to_comment' => false,
'simplified_null_return' => true,
'strict_param' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
;