forked from chamilo/chamilo-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
76 lines (71 loc) · 2.4 KB
/
.php_cs.dist
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
$header = '/* For licensing terms, see /license.txt */';
$rules = [
'@Symfony' => true,
//'@Symfony:risky' => true,
'array_syntax' => [
'syntax' => 'short',
],
/*'header_comment' => [
'header' => $header,
],*/
'blank_line_after_opening_tag' => false,
'no_extra_consecutive_blank_lines' => true,
'multiline_comment_opening_closing' => true,
'phpdoc_to_comment' => false,
'phpdoc_annotation_without_dot' => false,
'increment_style' => ['style' => 'post'],
'no_useless_else' => false,
'single_quote' => false,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'no_break_comment' => true,
// To be tested before insertion:
// 'strict_comparison' => true,
// 'strict_param' => true,
// 'php_unit_strict' => true,
];
$finder = PhpCsFixer\Finder::create()
->exclude('assets')
->exclude('bin')
->exclude('documentation')
->exclude('public/main/inc/lib/internationalization_database')
->exclude('public/main/inc/lib/javascript')
->exclude('public/main/inc/lib/kses-0.2.2')
->exclude('public/main/inc/lib/mimetex')
->exclude('public/main/inc/lib/nusoap')
->exclude('public/main/inc/lib/opengraph')
->exclude('public/main/inc/lib/ppt2png')
->exclude('public/main/inc/lib/pear')
->exclude('public/main/inc/lib/svg-edit')
->exclude('public/main/inc/lib/wami-recorder')
->exclude('public/main/inc/lib/xajax')
->exclude('public/main/lp/packaging')
->exclude('public/main/template')
->exclude('public/main/lang')
->exclude('public/plugin/buycourses/src/Culqi')
->exclude('public/plugin/buycourses/src/Requests')
->exclude('public/plugin/vchamilo/cli')
->exclude('public/plugin/pens/lib')
->exclude('public/plugin/bbb/lib')
->exclude('public/plugin/ims_lti')
->exclude('public/plugin/sepe/src/wsse')
->exclude('public/plugin/test2pdf/class')
->exclude('public/plugin/jcapture/src')
->exclude('public/plugin/jcapture/lib')
->exclude('tests')
->exclude('var')
->exclude('vendor')
->notPath('public/main/admin/db.php')
->notPath('public/check.php')
->notPath('public/main/admin/ldap_synchro.php')
->notPath('public/main/chat/emoji_strategy.php')
->in(__DIR__)
;
return PhpCsFixer\Config::create()
->setRules(
$rules
)
->setFinder($finder);