-
Notifications
You must be signed in to change notification settings - Fork 26
/
.php-cs-fixer.php
37 lines (31 loc) · 1.44 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
<?php
$header = <<<EOF
This file is part of the composer-changelogs project.
(c) Loïck Piera <[email protected]>
For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.
EOF;
$finder = PhpCsFixer\Finder::create()
->in([__DIR__])
;
$config = new PhpCsFixer\Config();
$config
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'], // Replace array() by []
'blank_line_after_opening_tag' => true, // Force new line after <?php
'concat_space' => ['spacing' => 'one'], // Force space around concatenation operator
'header_comment' => ['header' => $header], // Add the provided header comment ($header)
'heredoc_to_nowdoc' => false, // Do not convert heredoc to nowdoc
'no_superfluous_phpdoc_tags' => false, // Ensure complete PHPDoc annotations for all params
'phpdoc_order' => true, // Order "use" statements alphabetically
'simplified_null_return' => false, // Keep return null;
'single_line_throw' => false, // Allow throwing exceptions in more than one row
'strict_comparison' => true, // Strict comparison
'strict_param' => true, // Functions should use $strict param
])
->setUsingCache(true)
->setFinder($finder)
;
return $config;