File tree Expand file tree Collapse file tree 4 files changed +52
-0
lines changed Expand file tree Collapse file tree 4 files changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+
2
+ Commands to run:
3
+
4
+ Home page:
5
+
6
+ phpcs --standard=PSR12 --no-cache ./build/wiki-code-samples/ --basepath=./build/wiki-code-samples/ --extensions=php --report-width=100
7
+
8
+ Usage page:
9
+
10
+ phpcs --report-width=110 --no-colors -h
11
+
12
+ phpcs --standard=PSR12 --no-cache ./build/wiki-code-samples/path/to/code/myfile.php --basepath=./build/wiki-code-samples/ --report-width=100
13
+ phpcs --standard=PSR12 --no-cache ./build/wiki-code-samples/path/to/code/myfile.php --basepath=./build/wiki-code-samples/ --report-width=100 -n
14
+
15
+ phpcs --standard=PSR12 --no-cache ./build/wiki-code-samples/ --basepath=./build/wiki-code-samples/ --report-width=100 --report=summary
16
+ phpcs --standard=PSR12 --no-cache ./build/wiki-code-samples/ --basepath=./build/wiki-code-samples/ --report-width=100 --report=summary -n
17
+
18
+ phpcs ./src/Standards/Generic/ --standard=PSR12 --no-cache --extensions=php --report-width=100 -v
19
+
20
+ phpcs -i
21
+
22
+ Fixing:
23
+
24
+ phpcbf --report-width=110 --no-colors -h
25
+
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * File docblock.
4
+ */
5
+
6
+ namespace Foo ;
7
+
8
+ class Bar {
9
+ public function baz (Type $ param )
10
+ {
11
+ echo 'hello ' . 'world and a lot more text to make this line way too long - trying to reach 120 characters, but that takes work ' ;
12
+ return FALSE ;
13
+ }
14
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ if ($ foo ) {
4
+ } else if ($ bar ) {
5
+ echo 'hello ' . 'world and a lot more text to make this line way too long - trying to reach 120 characters, but that takes work ' ;
6
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ NAMESPACE Foo ;
4
+
5
+ if ($ foo ) {
6
+ } else if ($ bar ) {
7
+ }
You can’t perform that action at this time.
0 commit comments