-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.php-cs-fixer.php
More file actions
42 lines (39 loc) · 1.03 KB
/
.php-cs-fixer.php
File metadata and controls
42 lines (39 loc) · 1.03 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
36
37
38
39
40
41
42
<?php
declare(strict_types=1);
$finder = PhpCsFixer\Finder::create()
->notPath('vendor')
->notPath('node_modules')
->in(__DIR__)
->in('./resources/views')
->in('./config')
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return (new PhpCsFixer\Config)
->setRules([
'@PSR2' => true,
'array_syntax' => [
'syntax' => 'short',
],
'ordered_imports' => [
'sort_algorithm' => 'alpha',
],
'no_unused_imports' => true,
'array_indentation' => true,
'binary_operator_spaces' => [
'default' => 'single_space',
'operators' => [
'=>' => 'single_space',
'|' => 'no_space',
],
],
'full_opening_tag' => true,
'yoda_style' => [
'always_move_variable' => true,
'equal' => true,
'identical' => true,
'less_and_greater' => true,
],
])
->setFinder($finder);