Skip to content

Commit dd61041

Browse files
Add risky rules to php-cs-fixer
1 parent b7646c0 commit dd61041

File tree

1 file changed

+44
-22
lines changed

1 file changed

+44
-22
lines changed

.php-cs-fixer.dist.php

Lines changed: 44 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,16 @@
3131
->name('*php');
3232

3333
$header = <<<'COPYRIGHT'
34-
Cypher DSL
35-
Copyright (C) 2021 Wikibase Solutions
34+
This file is part of php-cypher-dsl.
3635
37-
This program is free software; you can redistribute it and/or
38-
modify it under the terms of the GNU General Public License
39-
as published by the Free Software Foundation; either version 2
40-
of the License, or (at your option) any later version.
36+
Copyright (C) 2021- Wikibase Solutions
4137
42-
This program is distributed in the hope that it will be useful,
43-
but WITHOUT ANY WARRANTY; without even the implied warranty of
44-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
45-
GNU General Public License for more details.
46-
47-
You should have received a copy of the GNU General Public License
48-
along with this program; if not, write to the Free Software
49-
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
38+
For the full copyright and license information, please view the LICENSE
39+
file that was distributed with this source code.
5040
COPYRIGHT;
5141

5242
return (new Config())
43+
->setRiskyAllowed(true)
5344
->setRules([
5445
'@PSR12' => true,
5546
'align_multiline_comment' => true,
@@ -75,35 +66,66 @@
7566
'yield',
7667
],
7768
],
69+
'compact_nullable_typehint' => true,
7870
'concat_space' => ['spacing' => 'one'],
71+
'declare_strict_types' => true,
72+
'declare_equal_normalize' => true,
7973
'fully_qualified_strict_types' => true,
74+
'global_namespace_import' => [
75+
'import_classes' => true,
76+
'import_constants' => false,
77+
'import_functions' => false
78+
],
8079
'header_comment' => [
81-
'header' => $header
80+
'header' => $header,
81+
'separate' => 'none'
8282
],
8383
'list_syntax' => [
8484
'syntax' => 'short',
8585
],
86+
'logical_operators' => true,
87+
'no_superfluous_phpdoc_tags' => true,
88+
'no_unset_cast' => true,
8689
'no_unused_imports' => true,
8790
'no_useless_else' => true,
8891
'no_useless_return' => true,
8992
'nullable_type_declaration_for_default_null_value' => true,
9093
'ordered_class_elements' => true,
9194
'ordered_imports' => true,
95+
'ordered_interfaces' => true,
96+
'ordered_traits' => true,
9297
'phpdoc_align' => [
9398
'align' => 'left',
9499
],
95100
'phpdoc_scalar' => true,
101+
'phpdoc_order_by_value' => [
102+
'annotations' => ['covers'],
103+
],
104+
'phpdoc_no_empty_return' => true,
105+
'phpdoc_order' => true,
106+
'php_unit_dedicate_assert' => true,
107+
'php_unit_set_up_tear_down_visibility' => true,
96108
'php_unit_method_casing' => [
97-
'case' => 'snake_case',
98-
],
99-
'phpdoc_order_by_value' => [
100-
'annotations' => ['covers'],
109+
'case' => 'camel_case',
101110
],
102-
'phpdoc_no_empty_return' => true,
103-
'phpdoc_order' => true,
111+
'php_unit_test_annotation' => [
112+
'style' => 'prefix',
113+
],
114+
'php_unit_test_case_static_method_calls' => [
115+
'call_type' => 'this',
116+
],
104117
'return_assignment' => true,
105118
'self_static_accessor' => true,
119+
'single_line_throw' => true,
106120
'simplified_if_return' => true,
107-
'trailing_comma_in_multiline' => true
121+
'static_lambda' => true,
122+
'strict_comparison' => true,
123+
'strict_param' => true,
124+
'trailing_comma_in_multiline' => true,
125+
'yoda_style' => [
126+
'equal' => false,
127+
'identical' => false,
128+
'less_and_greater' => false,
129+
]
108130
])
109131
->setFinder($finder);

0 commit comments

Comments
 (0)