-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs-fixer.dist.php
43 lines (41 loc) · 1.23 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
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
;
$config = new PhpCsFixer\Config();
return $config->setRules(
[
'@PSR12' => true,
'elseif' => false,
'array_syntax' => [
'syntax' => 'short',
],
/*
'braces_position' => [
'allow_single_line_anonymous_functions' => true,
'allow_single_line_empty_anonymous_classes' => true,
],
*/
//'braces_position' => false, // Breaks empty {} with a newline.
//'method_argument_space' => false, // Breaks lots of formatting.
'single_line_empty_body' => false,
'declare_strict_types' => true,
// Next for generated code.
'class_attributes_separation' => [
'elements' => [
'case' => 'none',
'const' => 'none',
'method' => 'one',
'property' => 'none',
'trait_import' => 'none',
],
],
'method_argument_space' => [
'on_multiline' => 'ensure_fully_multiline',
'attribute_placement' => 'standalone',
'after_heredoc' => true,
],
])
->setFinder($finder)
;