-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy path.php-cs-fixer.php
44 lines (41 loc) · 1.76 KB
/
.php-cs-fixer.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
<?php declare(strict_types=1);
/**
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
$finder = PhpCsFixer\Finder::create()
->in([__DIR__ . '/src']);
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'no_unused_imports' => true,
'array_syntax' => ['syntax' => 'short'],
'single_blank_line_before_namespace' => true,
'ordered_imports' => true,
'single_quote' => true,
'trailing_comma_in_multiline' => true,
'concat_space' => ['spacing' => 'one'],
'no_superfluous_phpdoc_tags' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'array_indentation' => true,
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'no_whitespace_in_blank_line' => true,
'class_attributes_separation' => ['elements' => ['const' => 'one', 'method' => 'one', 'property' => 'one']],
'cast_spaces' => ['space' => 'single'],
'single_blank_line_at_eof' => true,
'not_operator_with_successor_space' => true,
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
'return_type_declaration' => ['space_before' => 'none'],
'modernize_types_casting' => true,
'blank_line_after_opening_tag' => false,
'declare_strict_types' => true,
'header_comment' => [
'header' => 'This source file is subject to the license that is bundled with this package in the file LICENSE.',
'comment_type' => 'PHPDoc',
'location' => 'after_declare_strict',
'separate' => 'bottom'
],
])
->setRiskyAllowed(true)
->setFinder($finder);