@@ -21,7 +21,7 @@ You can install the package using [Composer](https://getcomposer.org):
2121``` bash
2222composer require dragon-code/codestyler --dev
2323
24- composer config scripts.style " vendor/bin/pint --parallel"
24+ composer config scripts.style " vendor/bin/rector && vendor/bin/ pint --parallel"
2525```
2626
2727It is also possible to establish dependence in the global area of visibility:
@@ -44,6 +44,7 @@ and `biome.json` file for [Biome Linter](https://biomejs.dev):
4444 "scripts" : {
4545 "post-update-cmd" : [
4646 " vendor/bin/codestyle pint 8.4" ,
47+ " vendor/bin/codestyle rector laravel" ,
4748 " vendor/bin/codestyle editorconfig" ,
4849 " vendor/bin/codestyle npm" ,
4950 " composer normalize"
@@ -59,6 +60,7 @@ When using a globally established dependence, the call must be replaced with the
5960 "scripts" : {
6061 "post-update-cmd" : [
6162 " codestyle pint 8.4" ,
63+ " codestyle rector laravel" ,
6264 " codestyle editorconfig" ,
6365 " codestyle npm" ,
6466 " composer normalize"
@@ -100,6 +102,35 @@ The linter is invoked by a console command:
100102composer style
101103```
102104
105+ ### Rector
106+
107+ [ ` Rector ` ] ( https://getrector.com ) is uses as the code rector for PHP.
108+
109+ The Rector is invoked by a console command:
110+
111+ ``` bash
112+ composer style
113+ ```
114+
115+ To do this, make sure the file is in the root of the project.
116+ You can also automate this process by adding a call to the file copy function in the ` scripts.post-update-cmd `
117+ section of the ` composer.json ` file.
118+
119+ ``` JSON
120+ {
121+ "scripts" : {
122+ "post-update-cmd" : [
123+ " vendor/bin/codestyle rector laravel"
124+ ]
125+ }
126+ }
127+ ```
128+
129+ Available presets:
130+
131+ - ` laravel `
132+ - ` default `
133+
103134### Node Linter
104135
105136[ Biome] ( https://biomejs.dev ) is used as the linter for JS, CSS and JSON.
@@ -183,11 +214,15 @@ After completing all the steps, the `composer.json` file will have the following
183214 "scripts" : {
184215 "post-update-cmd" : [
185216 " vendor/bin/codestyle pint 8.4" ,
217+ " vendor/bin/codestyle rector laravel" ,
186218 " vendor/bin/codestyle editorconfig" ,
187219 " vendor/bin/codestyle npm" ,
188220 " composer normalize"
189221 ],
190- "style" : " vendor/bin/pint --parallel"
222+ "style" : [
223+ " vendor/bin/pint --parallel" ,
224+ " vendor/bin/rector"
225+ ]
191226 }
192227}
193228```
0 commit comments