Skip to content

Commit 57ade95

Browse files
committed
Update config for new version of php-cs-fixer
1 parent 8391a2b commit 57ade95

File tree

1 file changed

+22
-12
lines changed

1 file changed

+22
-12
lines changed

.php_cs

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
11
<?php
22

3-
require_once './vendor/autoload.php';
3+
require_once __DIR__ . '/vendor/autoload.php';
44

5-
$finder = \Symfony\CS\Finder\DefaultFinder::create()
6-
->in('src/')
7-
->in('tests/');
5+
$finder = PhpCsFixer\Finder::create()
6+
->in('src')
7+
->in('tests');
88

9-
return \Symfony\CS\Config\Config::create()
9+
return PhpCsFixer\Config::create()
10+
->setRiskyAllowed(true)
1011
->setUsingCache(true)
11-
->fixers([
12-
'-pre_increment',
13-
'-concat_without_spaces',
14-
'concat_with_spaces',
15-
'ordered_use',
16-
'long_array_syntax',
12+
->setRules([
13+
'@PSR2' => true,
14+
'@Symfony' => true,
15+
'array_syntax' => ['syntax' => 'short'],
16+
'concat_space' => ['spacing' => 'one'],
17+
'yoda_style' => false,
18+
'is_null' => true,
19+
'modernize_types_casting' => true,
20+
'no_alias_functions' => true,
21+
'ordered_imports' => true,
22+
'phpdoc_order' => true,
23+
'pre_increment' => false,
24+
'psr4' => true,
25+
'random_api_migration' => true,
26+
'single_blank_line_before_namespace' => false,
1727
])
18-
->finder($finder);
28+
->setFinder($finder);

0 commit comments

Comments
 (0)