forked from 3liz/lizmap-web-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php_cs.dist
61 lines (59 loc) · 2.58 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
<?php
$finder = PhpCsFixer\Finder::create()
//->notPath('src/Symfony/Component/Translation/Tests/fixtures/resources.php')
->in(array(
__DIR__.'/lizmap/modules/admin',
__DIR__.'/lizmap/modules/dataviz',
__DIR__.'/lizmap/modules/dynamicLayers',
__DIR__.'/lizmap/modules/lizmap',
__DIR__.'/lizmap/modules/view',
__DIR__.'/lizmap/plugins/',
__DIR__.'/lizmap/responses/',
__DIR__.'/lizmap/scripts/',
))
//->exclude(__DIR__.'/lizmap/modules/proj4php/classes/')
;
return PhpCsFixer\Config::create()
->setCacheFile(__DIR__.'/.php_cs.cache')
->setRules([
'@PSR2' => true,
'@Symfony' => true,
'@PhpCsFixer' => true,
'array_syntax' => array('syntax'=>'long'),
'method_argument_space'=> ['on_multiline' => 'ensure_fully_multiline'],
'new_with_braces'=> true,
'no_whitespace_in_blank_line'=> true,
'no_whitespace_before_comma_in_array'=> true,
'no_useless_return' => true,
'no_unneeded_final_method'=> false,
'no_unset_cast' => false,
'no_leading_import_slash'=> true,
'no_leading_namespace_whitespace'=> true,
'no_extra_blank_lines'=> true,
'no_empty_statement'=> true,
'no_empty_comment'=> true,
'object_operator_without_whitespace' => true,
'ordered_class_elements' => false,
'phpdoc_var_without_name' => true,
'phpdoc_types' => true,
'phpdoc_trim_consecutive_blank_line_separation' => true,
'phpdoc_no_useless_inheritdoc' => true,
'phpdoc_no_empty_return' => true,
'phpdoc_add_missing_param_annotation' => true,
'protected_to_private' => false,
'semicolon_after_instruction' => true,
'short_scalar_cast' => true,
'simplified_null_return' => false,
'simple_to_complex_string_variable' => false,
'standardize_not_equals' => true,
'standardize_increment' => true,
'whitespace_after_comma_in_array' => true,
'yoda_style'=>array(
'always_move_variable' => false,
'equal' => false,
'identical' => false,
'less_and_greater' => null,
)
])
->setFinder($finder)
;