Skip to content

Commit 17aa19e

Browse files
committed
WIP | bits and pieces for the wiki code samples
1 parent 65e226c commit 17aa19e

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

build/wiki-code-samples/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
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+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
NAMESPACE Foo;
4+
5+
if ($foo) {
6+
} else if ($bar) {
7+
}

0 commit comments

Comments
 (0)