Skip to content

Commit 391247d

Browse files
committed
Added CS Fixer config
1 parent fd332c3 commit 391247d

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

.php-cs-fixer.dist.php

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
3+
$finder = (new PhpCsFixer\Finder())
4+
->in('src')
5+
;
6+
7+
return (new PhpCsFixer\Config())
8+
->setRiskyAllowed(true)
9+
->setRules([
10+
'@PHP81Migration' => true,
11+
'@PHP80Migration:risky' => true,
12+
'@PHPUnit84Migration:risky' => true,
13+
'@PSR1' => true,
14+
'@PSR12' => true,
15+
'@PhpCsFixer' => true,
16+
'@Symfony' => true,
17+
'ternary_to_elvis_operator' => true,
18+
'set_type_to_cast' => true,
19+
'self_accessor' => true,
20+
'psr_autoloading' => true,
21+
'php_unit_test_annotation' => ['style' => 'annotation'],
22+
'php_unit_set_up_tear_down_visibility' => true,
23+
'php_unit_construct' => true,
24+
'no_useless_sprintf' => true,
25+
'no_homoglyph_names' => true,
26+
'native_function_invocation' => true,
27+
'native_constant_invocation' => true,
28+
'modernize_types_casting' => true,
29+
'logical_operators' => true,
30+
'is_null' => true,
31+
'function_to_constant' => true,
32+
'fopen_flag_order' => true,
33+
'error_suppression' => true,
34+
'ereg_to_preg' => true,
35+
'dir_constant' => true,
36+
])
37+
->setFinder($finder)
38+
->setCacheFile('.php-cs-fixer.cache') // forward compatibility with 3.x line
39+
;

0 commit comments

Comments
 (0)