forked from owncloud/ocis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.php-cs-fixer.dist.php
More file actions
50 lines (46 loc) · 1.57 KB
/
.php-cs-fixer.dist.php
File metadata and controls
50 lines (46 loc) · 1.57 KB
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
<?php
$dirToParse = 'tests/acceptance/';
$dirIterator = new DirectoryIterator(__DIR__ . '/' . $dirToParse);
$excludeDirs = [
'node_modules',
'vendor-php'
];
$finder = PhpCsFixer\Finder::create()
->exclude($excludeDirs)
->in(__DIR__);
$ocRule = (new OC\CodingStandard\Config())->getRules();
$config = new PhpCsFixer\Config();
$config->setFinder($finder)
->setIndent("\t")
->setRules(
array_merge(
$ocRule,
[
"return_type_declaration" => [
"space_before" => "none",
],
'single_space_around_construct' => true,
'no_unused_imports' => true,
'array_indentation' => true,
'method_chaining_indentation' => true,
'trailing_comma_in_multiline' => [
'elements' => ['arrays', 'arguments', 'parameters'],
],
'no_useless_else' => true,
'single_line_comment_spacing' => true,
'no_trailing_whitespace_in_comment' => true,
'no_empty_comment' => true,
'no_singleline_whitespace_before_semicolons' => true,
'type_declaration_spaces' => true,
'binary_operator_spaces' => true,
'phpdoc_to_return_type' => true,
'void_return' => true,
'no_useless_concat_operator' => true,
'concat_space' => [
"spacing" => "one",
],
]
)
);
$config->setFinder($finder);
return $config;