forked from LemonMind/pimcore-message-bundle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.php-cs
36 lines (31 loc) · 1 KB
/
.php-cs
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
<?php
$finder = PhpCsFixer\Finder::create();
$finder
->in([
__DIR__ . '/src',
])
->exclude([
])
->notName('*.html.php')
->notName('*.html.twig');
$config = new PhpCsFixer\Config();
$config
->setRules([
'@PSR1' => true,
'@PSR12' => true,
'@Symfony' => true,
'array_push' => true,
'declare_strict_types' => true,
'phpdoc_to_return_type' => true,
'return_type_declaration' => true,
'fully_qualified_strict_types' => true,
'global_namespace_import' => true,
'no_unused_imports' => true,
'array_syntax' => ['syntax' => 'short'],
'concat_space' => ['spacing' => 'one'],
'binary_operator_spaces' => ['default' => 'single_space'],
'blank_line_before_statement' => ['statements' => ['break', 'continue', 'declare', 'return', 'throw', 'try', 'for', 'foreach', 'while', 'switch', 'if']],
])
->setFinder($finder)
->setCacheFile(__DIR__ . '/.php_cs.cache');
return $config;