-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs
41 lines (39 loc) · 1.31 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
38
39
40
41
<?php
/** @noinspection PhpUndefinedNamespaceInspection */
/** @noinspection PhpUndefinedClassInspection */
$finder = PhpCsFixer\Finder::create()
->notPath('cache')
->notPath('vendor')
->in(__DIR__)
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true)
;
return PhpCsFixer\Config::create()
->setRules([
'@PSR2' => true,
'align_multiline_comment' => ['comment_type' => 'phpdocs_like'],
'array_syntax' => ['syntax' => 'short'],
'braces' => [
'allow_single_line_closure' => true,
'position_after_control_structures' => 'next',
'position_after_functions_and_oop_constructs' => 'next',
'position_after_anonymous_constructs' => 'next',
],
'constant_case' => ['case' => 'lower'],
'function_declaration' => ['closure_function_spacing' => 'none'],
'linebreak_after_opening_tag' => true,
'phpdoc_order' => true,
'strict_param' => true,
'string_line_ending' => true,
'native_function_invocation' => [
'include' => ['@all'],
],
'global_namespace_import' => [
'import_classes' => null,
'import_constants' => true,
'import_functions' => true,
]
])
->setFinder($finder);