@@ -16,18 +16,18 @@ You can also add it manually, like this, to get the latest version:
16
16
17
17
``` json
18
18
"require-dev" : {
19
- "binary-cats/laravel-php-styles" : " ^1 .0"
19
+ "binary-cats/laravel-php-styles" : " ^2 .0"
20
20
},
21
21
```
22
22
23
23
## Laravel
24
24
25
25
You can publish the stub file using
26
26
``` bash
27
- php artisan vendor:publish --provider=BinaryCats\\ PhpStyles\\ PhpStylesServiceProvider
27
+ php artisan vendor:publish --provider=BinaryCats\\ PhpStyles\\ PhpStyleServiceProvider
28
28
```
29
29
30
- You should also add ` .php_cs .cache ` to your ` .gitignore ` .
30
+ You should also add ` .php-cs-fixer .cache ` to your ` .gitignore ` .
31
31
32
32
## Config
33
33
@@ -37,9 +37,7 @@ The package provides with the current set of [rules](./src/rules.php):
37
37
return [
38
38
'@Symfony' => true,
39
39
'AdamWojs/phpdoc_force_fqcn_fixer' => true,
40
- 'array_syntax' => ['syntax' => 'short'],
41
40
'concat_space' => ['spacing' => 'one'],
42
- 'final_class' => false,
43
41
'new_with_braces' => true,
44
42
'no_superfluous_phpdoc_tags' => false,
45
43
'not_operator_with_successor_space' => true,
@@ -50,7 +48,7 @@ return [
50
48
51
49
## Integration
52
50
53
- PHP-CS-Fixer is going to expect your configuration to be in a ` /.php_cs .dist ` file.
51
+ PHP-CS-Fixer is going to expect your * default * configuration to be in a ` /.php-cs-fixer .dist.php ` file.
54
52
55
53
``` php
56
54
<?php
@@ -75,7 +73,7 @@ And now you can run the fix like this:
75
73
76
74
If you want to see the progress as you go by:
77
75
``` bash
78
- ./vendor/bin/php-cs-fixer fix --verbose --show-progress=estimate
76
+ ./vendor/bin/php-cs-fixer fix --verbose --show-progress=dots
79
77
```
80
78
81
79
If you want to add this to composer alias, you can add this to your ` composer.json ` :
@@ -88,17 +86,28 @@ If you want to add this to composer alias, you can add this to your `composer.js
88
86
89
87
## Advanced Use
90
88
91
- If you want to change the rules, disable, or add your own, simply update ` .php_cs .dist ` in your project's root:
89
+ If you want to change the rules, disable, or add your own, simply update ` .php-cs-fixer .dist.php ` in your project's root:
92
90
93
91
``` php
92
+ ...
94
93
return BinaryCats\PhpStyles\styles($finder, [
95
- // turn the force FQCN fixer off
96
- 'AdamWojs/phpdoc_force_fqcn_fixer' => false,
97
94
// Do not wrap concat . with spaces
98
95
'concat_space' => ['spacing' => 'none'],
99
96
]);
100
97
```
101
98
99
+ If you want to add more custom fixers, there is a third argument:
100
+ ``` php
101
+ ...
102
+ return BinaryCats\PhpStyles\styles($finder, [
103
+ // turn the force FQCN fixer off
104
+ 'AdamWojs/phpdoc_force_fqcn_fixer' => false,
105
+ ], [
106
+ new \AdamWojs\PhpCsFixerPhpdocForceFQCN\Fixer\Phpdoc\ForceFQCNFixer,
107
+ ]);
108
+
109
+ ```
110
+
102
111
## Change log
103
112
104
113
Please see [ CHANGELOG] ( CHANGELOG.md ) for more information on what has changed recently.
0 commit comments