-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.php_cs
35 lines (30 loc) · 1.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
<?php
$fileHeaderComment = <<<COMMENT
This file is part of the Structurizr for PHP.
(c) Norbert Orzechowicz <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
COMMENT;
$finder = PhpCsFixer\Finder::create()
->in([
__DIR__ . '/src',
]);
return PhpCsFixer\Config::create()
->setRiskyAllowed(true)
->setCacheFile(__DIR__.'/.php_cs.cache')
->setRules([
'@PSR2' => true,
'psr4' => true,
'strict_param' => true,
'header_comment' => ['header' => $fileHeaderComment, 'separate' => 'both'],
'ordered_imports' => true,
'blank_line_before_statement' => true,
'trailing_comma_in_multiline_array' => true,
'strict_comparison' => true,
'return_type_declaration' => ['space_before' => 'one'],
'class_attributes_separation' => ['elements' => ['const', 'property', 'method']],
'no_unused_imports' => true,
'declare_strict_types' => true,
'blank_line_after_opening_tag' => true
])
->setFinder($finder);