Skip to content

Commit 45f1514

Browse files
committed
Update php-cs-fixer, change to symfony rule set
1 parent 076bd9c commit 45f1514

3 files changed

Lines changed: 23 additions & 55 deletions

File tree

.php-cs-fixer.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
// Invoke the config easily with `php-cs-fixer fix`
4+
5+
$finder = \PhpCsFixer\Finder::create()
6+
->files()
7+
->name('*.php')
8+
->in(__DIR__ . '/src')
9+
->in(__DIR__ . '/tests');
10+
11+
$config = new PhpCsFixer\Config();
12+
13+
return $config
14+
->setUsingCache(false)
15+
->setRules([
16+
'@Symfony' => true,
17+
'@Symfony:risky' => true,
18+
'yoda_style' => false,
19+
'single_line_throw' => false,
20+
])
21+
->setRiskyAllowed(true)
22+
->setFinder($finder);

.php_cs

Lines changed: 0 additions & 54 deletions
This file was deleted.

tools/.php-cs-fixer/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"require": {
3-
"friendsofphp/php-cs-fixer": "2.*"
3+
"friendsofphp/php-cs-fixer": "3.*"
44
}
55
}

0 commit comments

Comments
 (0)