-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php-cs-fixer.php
28 lines (27 loc) · 1.26 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
<?php
/**
* Project PHP formatting rules for php-cs-fixer.
*
* @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer
* @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/rules/index.rst
* @see https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/ruleSets/index.rst
*/
$config = new PhpCsFixer\Config();
return $config->setRules(
[
'@PER' => true, // ruleset (PSR12)
'@PhpCsFixer' => true, // ruleset (includes @PER & @Symfony)
'binary_operator_spaces' => [ // align array values
'operators' => [
'=' => 'align_single_space_minimal',
'=>' => 'align_single_space_minimal',
],
],
'concat_space' => ['spacing' => 'one'], // `'test' . 'ing'`
'multiline_whitespace_before_semicolons' => false, // allow semi-colon on same line as multi-line func
'no_unneeded_curly_braces' => false, // breaks `namespace {`
'ordered_class_elements' => false, // do not reorder class elements
'phpdoc_no_empty_return' => false, // allow `@return void`
'phpdoc_summary' => false, // don't add full stops to title
]
);