generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.php_cs.dist.php
55 lines (53 loc) · 1.7 KB
/
.php_cs.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
$finder = Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->name('*.php')
->notName('*.blade.php')
->ignoreDotFiles(true)
->ignoreVCS(true);
return (new PhpCsFixer\Config())
->setRules([
'@PSR2' => true,
'no_whitespace_in_blank_line' => true,
'array_syntax' => [
'syntax' => 'short',
],
'no_unused_imports' => true,
'trailing_comma_in_multiline' => ['elements' => ['arrays']],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
],
'no_empty_comment' => true,
'no_empty_phpdoc' => true,
'no_empty_statement' => true,
'single_quote' => true,
'constant_case' => true,
'lowercase_keywords' => true,
'lowercase_static_reference' => true,
'native_function_casing' => true,
'native_function_type_declaration_casing' => true,
'no_useless_else' => true,
'function_declaration' => true,
'function_typehint_space' => true,
'return_type_declaration' => [
'space_before' => 'none',
],
'single_import_per_statement' => true,
'list_syntax' => [
'syntax' => 'short',
],
'clean_namespace' => true,
'logical_operators' => true,
'new_with_braces' => true,
'ternary_to_null_coalescing' => true,
'no_closing_tag' => true,
'array_indentation' => true,
'compact_nullable_typehint' => true,
'no_spaces_around_offset' => true,
'blank_line_after_opening_tag' => false,
])
->setFinder($finder);