-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs
37 lines (35 loc) · 1.03 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
37
<?php
$finder = PhpCsFixer\Finder::create()
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
->notPath('cache')
->notPath('vendor');
return PhpCsFixer\Config::create()
->setLineEnding("\n")
->setRules([
'@PSR2' => true, //https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/src/RuleSet.php
'function_declaration' => [
'closure_function_spacing' => 'none',//Spaces => Before Parentheses => Anonymous function parentheses
],
/* Array */
'array_syntax' => [
'syntax' => 'short',
],
'trailing_comma_in_multiline_array' => true,
'no_trailing_comma_in_singleline_array' => true,
/* Array */
/* List */
'list_syntax' => [
'syntax' => 'short',
],
/* List */
/* Imports */
'ordered_imports' => [
'sortAlgorithm' => 'alpha',
],
'no_unused_imports' => true,
/* Imports */
])
->setFinder($finder)
->setUsingCache(false);