Skip to content

Commit efa10fb

Browse files
committed
chore(deps): updated CS fixer settings
1 parent 7ba8262 commit efa10fb

File tree

3 files changed

+28
-10
lines changed

3 files changed

+28
-10
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea
2+
.php_cs.cache
23
/test/temp/
34
/vendor/
4-
/composer.lock
5+
/composer.lock

.php_cs

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
11
<?php
2-
$finder = Symfony\CS\Finder\DefaultFinder::create()
3-
->in('src')
4-
->in('test')
5-
->notPath('temp');
6-
$config = Symfony\CS\Config\Config::create();
7-
$config->fixers(['ordered_use']);
8-
$config->finder($finder);
9-
return $config;
2+
// for more info see:
3+
// https://github.com/FriendsOfPHP/PHP-CS-Fixer#usage
4+
// https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/master/UPGRADE.md
5+
6+
if (class_exists('PhpCsFixer\Finder')) { // PHP-CS-Fixer 2.x
7+
$finder = PhpCsFixer\Finder::create()
8+
->in('src')
9+
->in('test')
10+
->notPath('temp')
11+
;
12+
13+
return PhpCsFixer\Config::create()
14+
->setFinder($finder)
15+
;
16+
} elseif (class_exists('Symfony\CS\Finder\DefaultFinder')) { // PHP-CS-Fixer 1.x
17+
$finder = Symfony\CS\Finder\DefaultFinder::create()
18+
->in('src')
19+
->in('test')
20+
->notPath('temp')
21+
;
22+
23+
return Symfony\CS\Config\Config::create()
24+
->finder($finder)
25+
;
26+
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"symfony/framework-bundle": "~2.8|~3.0|~4.0",
3636
"symfony/validator": "~2.8|~3.0|~4.0",
3737
"symfony/yaml": "~2.8|~3.0|~4.0",
38-
"phpunit/phpunit": "^4.8|^5.8",
38+
"phpunit/phpunit": "^4.8|^6.0",
3939
"symfony/security": "~2.8|~3.0|~4.0"
4040
}
4141
}

0 commit comments

Comments
 (0)