-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
35 lines (32 loc) · 1.04 KB
/
.php-cs-fixer.php
File metadata and controls
35 lines (32 loc) · 1.04 KB
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
<?php
$finder = Symfony\Component\Finder\Finder::create()
->notPath('vendor')
->notPath('node_modules')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php');
$config = new PhpCsFixer\Config();
$config
->setRules([
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => [ 'sort_algorithm' => 'alpha' ],
'no_unused_imports' => true,
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => [
'===' => 'align_single_space_minimal',
'=>' => 'align_single_space_minimal',
'=' => 'align_single_space_minimal',
]
],
'full_opening_tag' => true,
'yoda_style' => [
'always_move_variable' => true,
'equal' => true,
'identical' => true,
'less_and_greater' => true,
],
])
->setFinder($finder);
return $config;