Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 19ae8f9

Browse files
author
anolilab
committed
Update Readme | use only php-cs-fixer 2.0@dev
1 parent 219b7f9 commit 19ae8f9

File tree

4 files changed

+37
-14
lines changed

4 files changed

+37
-14
lines changed

.php_cs

+10-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
<?php
2-
32
use Narrowspark\CS\Config\Config;
43

54
$config = new Config();
6-
$config->getFinder()->in(__DIR__);
5+
$config->getFinder()
6+
->files()
7+
->in(__DIR__)
8+
->exclude('build')
9+
->exclude('vendor')
10+
->notName('CONTRIBUTING')
11+
->ignoreDotFiles(true)
12+
->ignoreVCS(true);
713

814
$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__;
915

1016
$config->setCacheFile($cacheDir . '/.php_cs.cache');
1117

12-
return $config;
18+
19+
return $config;

README.md

+14-3
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,26 @@ Create a configuration file '.php_cs' in the root of your project:
2828

2929
``` php
3030
<?php
31-
32-
$config = new Narrowspark\CS\Config\Config();
33-
$config->getFinder()->in(__DIR__);
31+
use Narrowspark\CS\Config\Config;
32+
use Symfony\CS\Fixer;
33+
34+
$config = new Config();
35+
$config->getFinder()
36+
->files()
37+
->in(__DIR__)
38+
->exclude('build')
39+
->exclude('vendor')
40+
->notName('CONTRIBUTING')
41+
->ignoreDotFiles(true)
42+
->ignoreVCS(true);
3443

3544
$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__;
3645

3746
$config->setCacheFile($cacheDir . '/.php_cs.cache');
3847

48+
3949
return $config;
50+
4051
```
4152

4253
### Git

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
],
2626
"require": {
2727
"php" : ">=5.6",
28-
"fabpot/php-cs-fixer" : "~1.11|2.0.x-dev"
28+
"fabpot/php-cs-fixer" : "2.0.x-dev"
2929
},
3030
"require-dev": {
3131
"phpunit/phpunit" : "~5.1.3"

composer.lock

+12-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)