forked from 68publishers/webpack-encore-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.dist.php
48 lines (45 loc) · 1.18 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
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->name(['*.php', '*.phpt']);
return (new PhpCsFixer\Config())
->setUsingCache(FALSE)
->setIndent("\t")
->setRules([
'@PSR2' => TRUE,
'array_syntax' => ['syntax' => 'short'],
'trailing_comma_in_multiline' => TRUE,
'constant_case' => [
'case' => 'upper',
],
'declare_strict_types' => TRUE,
'phpdoc_align' => TRUE,
'blank_line_after_opening_tag' => TRUE,
'blank_line_before_statement' => [
'statements' => ['break', 'continue', 'declare', 'return'],
],
'blank_line_after_namespace' => TRUE,
'single_blank_line_before_namespace' => TRUE,
'return_type_declaration' => [
'space_before' => 'none',
],
'ordered_imports' => [
'sort_algorithm' => 'length',
'imports_order' => ['class', 'function', 'const'],
],
'no_unused_imports' => TRUE,
'single_line_after_imports' => TRUE,
'no_leading_import_slash' => TRUE,
'global_namespace_import' => [
'import_constants' => TRUE,
'import_functions' => TRUE,
'import_classes' => TRUE,
],
'concat_space' => [
'spacing' => 'one',
],
])
->setRiskyAllowed(TRUE)
->setFinder($finder);