-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.php-cs-fixer.dist.php
59 lines (57 loc) · 1.6 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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__);
// phpcs-fixer rules
// https://mlocati.github.io/php-cs-fixer-configurator/#version:3.38
$config = new PhpCsFixer\Config();
return $config->setRules(
[
'@PSR12' => true,
'@PhpCsFixer' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_before_statement' => [
'statements' => [
'case',
'continue',
'declare',
'default',
'do',
'exit',
'for',
'foreach',
'goto',
'if',
'include',
'include_once',
'require',
'require_once',
'return',
'switch',
'throw',
'try',
'while',
'yield',
],
],
'self_static_accessor' => true,
'global_namespace_import' => [
'import_constants' => true,
'import_functions' => true,
],
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'phpdoc_no_empty_return' => false,
'phpdoc_to_comment' => [
'ignored_tags' => [
'var'
]
],
'single_quote' => true,
'strict_param' => true,
'yoda_style' => [
'always_move_variable' => false,
'equal' => false,
'identical' => false
],
'concat_space' => ['spacing' => 'one'],
]
)->setFinder($finder);