-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.php-cs-fixer.dist.php
33 lines (31 loc) · 951 Bytes
/
.php-cs-fixer.dist.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
<?php
$finder = PhpCsFixer\Finder::create()
->ignoreDotFiles(true)
->ignoreVCS(true)
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->notName('*.blade.php');
return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => true,
'blank_line_before_statement' => true,
'class_attributes_separation' => [
'elements' => [
'method' => 'one',
],
],
'method_argument_space' => true,
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
'phpdoc_scalar' => true,
'phpdoc_var_without_name' => true,
'trailing_comma_in_multiline' => true,
'unary_operator_spaces' => true,
])
->setFinder($finder);