Skip to content

Commit 95d50ca

Browse files
authored
Merge pull request #49 from mvorisek/fix_cs
Improve and assert CS
2 parents 2f8d52e + 5f368a7 commit 95d50ca

File tree

6 files changed

+120
-226
lines changed

6 files changed

+120
-226
lines changed

.php-cs-fixer.dist.php

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -58,43 +58,8 @@
5858
// also prevent bounding of unwanted variables for GC
5959
'use_arrow_functions' => false,
6060

61-
// TODO
62-
'align_multiline_comment' => false,
63-
'array_indentation' => false,
64-
'binary_operator_spaces' => false,
65-
'blank_line_after_opening_tag' => false,
66-
'blank_line_before_statement' => false,
67-
'concat_space' => false,
68-
'control_structure_continuation_position' => false,
61+
// disable too destructive formating for now
6962
'declare_strict_types' => false,
70-
'explicit_string_variable' => false,
71-
'function_declaration' => false,
72-
'function_to_constant' => false,
73-
'general_phpdoc_annotation_remove' => false,
74-
'include' => false,
75-
'list_syntax' => false,
76-
'method_argument_space' => false,
77-
'native_constant_invocation' => false,
78-
'new_with_parentheses' => false,
79-
'no_alias_functions' => false,
80-
'no_empty_phpdoc' => false,
81-
'no_spaces_after_function_name' => false,
82-
'no_superfluous_phpdoc_tags' => false,
83-
'ordered_imports' => false,
84-
'phpdoc_indent' => false,
85-
'phpdoc_no_alias_tag' => false,
86-
'phpdoc_no_package' => false,
87-
'phpdoc_separation' => false,
88-
'phpdoc_summary' => false,
89-
'single_line_empty_body' => false,
90-
'single_quote' => false,
91-
'single_space_around_construct' => false,
92-
'spaces_inside_parentheses' => false,
93-
'static_lambda' => false,
94-
'strict_comparison' => false,
95-
'strict_param' => false,
96-
'string_implicit_backslashes' => false,
97-
'yoda_style' => false,
9863
])
9964
->setFinder($finder)
10065
->setCacheFile(sys_get_temp_dir() . '/php-cs-fixer.' . md5(__DIR__) . '.cache');

phpstan.neon.dist

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,8 @@ parameters:
1212
# relax strict rules
1313
- '~^Only booleans are allowed in .+, .+ given( on the (left|right) side)?\.~'
1414
- '~^Construct empty\(\) is not allowed\. Use more strict comparison\.~'
15-
- '~^Loose comparison via "[=!]=" is not allowed\.~'
16-
17-
# TODO
18-
-
19-
message: '~^Anonymous function uses \$this assigned to variable \$self. Use \$this directly in the function body\.$~'
20-
path: 'src/ExtensionInstaller.php'
21-
count: 3
15+
2216
-
2317
message: '~^Constant RCMAIL_VERSION not found\.$~'
2418
path: 'src/ExtensionInstaller.php'
2519
count: 3
26-
-
27-
message: '~^Method Roundcube\\Composer\\ExtensionInstaller::install\(\) should return React\\Promise\\PromiseInterface<void\|null>|null but return statement is missing\.$~'
28-
path: 'src/ExtensionInstaller.php'
29-
count: 3
30-
-
31-
message: '~^Undefined variable: \$rootdir$~'
32-
path: 'src/ExtensionInstaller.php'
33-
count: 1
34-
-
35-
message: '~^Short ternary operator is not allowed\. Use null coalesce operator if applicable or consider using long ternary\.$~'
36-
path: 'src/ExtensionInstaller.php'
37-
count: 1
38-
-
39-
message: '~^Call to function in_array\(\) requires parameter #3 to be set\.$~'
40-
path: 'src/PluginInstaller.php'
41-
count: 1
42-
-
43-
message: '~^Call to function array_search\(\) requires parameter #3 to be set\.$~'
44-
path: 'src/PluginInstaller.php'
45-
count: 1

0 commit comments

Comments
 (0)