@@ -112,28 +112,53 @@ Miscellaneous Options:
112
112
113
113
When using the PHPCBF command, you do not need to specify a report type. PHPCBF will automatically make changes to your source files:
114
114
115
+ <!--
116
+ Regenerate the below output snippet by running the following command from the PHP_CodeSniffer project root directory:
117
+ $ phpcbf ./src/Runner.php ./src/Config.php --standard=PSR12 --basepath=./ --report-width=100
118
+ WARNING: DO NOT COMMIT THE RESULT!
119
+ -->
115
120
``` bash
116
121
$ phpcbf /path/to/code
117
- Processing init.php [PHP => 7875 tokens in 960 lines]... DONE in 274ms (12 fixable violations)
118
- => Fixing file: 0/12 violations remaining [made 3 passes]... DONE in 412ms
119
- Processing config.php [PHP => 8009 tokens in 957 lines]... DONE in 421ms (155 fixable violations)
120
- => Fixing file: 0/155 violations remaining [made 7 passes]... DONE in 937ms
121
- Patched 2 files
122
- Time: 2.55 secs, Memory: 25.00Mb
122
+
123
+ PHPCBF RESULT SUMMARY
124
+ ----------------------------------------------------------------------
125
+ FILE FIXED REMAINING
126
+ ----------------------------------------------------------------------
127
+ src/Runner.php 95 16
128
+ src/Config.php 889 38
129
+ ----------------------------------------------------------------------
130
+ A TOTAL OF 984 ERRORS WERE FIXED IN 2 FILES
131
+ ----------------------------------------------------------------------
123
132
```
124
133
125
134
If you do not want to overwrite existing files, you can specify the ` --suffix ` command line argument and provide a filename suffix to use for new files. A fixed copy of each file will be created and stored in the same directory as the original file. If a file already exists with the new name, it will be overwritten.
126
135
136
+ <!--
137
+ Regenerate the below output snippet by running the following command from the PHP_CodeSniffer project root directory:
138
+ $ phpcbf -v ./src/Runner.php ./src/Config.php --standard=PSR12 --suffix=.fixed --basepath=./ --report-width=100
139
+ WARNING: DO NOT COMMIT THE RESULT!
140
+ -->
127
141
``` bash
128
- $ phpcbf /path/to/code --suffix=.fixed
129
- Processing init.php [PHP => 7875 tokens in 960 lines]... DONE in 274ms (12 fixable violations)
130
- => Fixing file: 0/12 violations remaining [made 3 passes]... DONE in 412ms
131
- => Fixed file written to init.php.fixed
132
- Processing config.php [PHP => 8009 tokens in 957 lines]... DONE in 421ms (155 fixable violations)
133
- => Fixing file: 0/155 violations remaining [made 7 passes]... DONE in 937ms
134
- => Fixed file written to config.php.fixed
135
- Fixed 2 files
136
- Time: 2.55 secs, Memory: 25.00Mb
142
+ $ phpcbf -v /path/to/code --suffix=.fixed
143
+
144
+ Creating file list... DONE (2 files in queue)
145
+ Changing into directory src
146
+ Processing Runner.php [6415 tokens in 907 lines]... DONE in 193ms (91 fixable errors, 4 fixable warnings)
147
+ => Fixing file: 0/95 violations remaining [made 4 passes]... DONE in 771ms
148
+ => Fixed file written to Runner.php.fixed
149
+ Processing Config.php [13891 tokens in 1792 lines]... DONE in 444ms (865 fixable errors, 24 fixable warnings)
150
+ => Fixing file: 0/889 violations remaining [made 4 passes]... DONE in 1.72 secs
151
+ => Fixed file written to Config.php.fixed
152
+
153
+ PHPCBF RESULT SUMMARY
154
+ ----------------------------------------------------------------------
155
+ FILE FIXED REMAINING
156
+ ----------------------------------------------------------------------
157
+ src/Runner.php 95 16
158
+ src/Config.php 889 38
159
+ ----------------------------------------------------------------------
160
+ A TOTAL OF 984 ERRORS WERE FIXED IN 2 FILES
161
+ ----------------------------------------------------------------------
137
162
```
138
163
139
164
<p align =" right " ><a href =" #table-of-contents " >back to top</a ></p >
0 commit comments