File tree 1 file changed +66
-0
lines changed
src/Standards/Squiz/Docs/WhiteSpace
1 file changed +66
-0
lines changed Original file line number Diff line number Diff line change
1
+ <documentation title =" Superfluous Whitespace" >
2
+ <standard >
3
+ <![CDATA[
4
+ There should be no extra whitespace at the start of a file.
5
+ ]]>
6
+ </standard >
7
+ <code_comparison >
8
+ <code title =" Valid: No whitespace preceding first content in file." >
9
+ <![CDATA[ <?php
10
+ echo 'hi';
11
+ ]]>
12
+ </code >
13
+ <code title =" Invalid: Whitespace used before content in file." >
14
+ <![CDATA[
15
+ <em></em>
16
+ <?php
17
+ echo 'hi';
18
+ ]]>
19
+ </code >
20
+ </code_comparison >
21
+ <standard >
22
+ <![CDATA[
23
+ There should be no trailing whitespace at the end of lines.
24
+ ]]>
25
+ </standard >
26
+ <code_comparison >
27
+ <code title =" Valid: No whitespace found at end of line." >
28
+ <![CDATA[
29
+ echo 'hello';
30
+ ]]>
31
+ </code >
32
+ <code title =" Invalid: Whitespace found at end of line." >
33
+ <![CDATA[
34
+ echo 'hello';<em> </em>
35
+ ]]>
36
+ </code >
37
+ </code_comparison >
38
+ <standard >
39
+ <![CDATA[
40
+ There should be no more than one consecutive blank newline in functions.
41
+ ]]>
42
+ </standard >
43
+ <code_comparison >
44
+ <code title =" Valid: Functions do not contain multiple empty lines in a row." >
45
+ <![CDATA[
46
+ function myFunction()
47
+ {
48
+ echo 'code here';
49
+
50
+ echo 'code here';
51
+ }
52
+ ]]>
53
+ </code >
54
+ <code title =" Invalid: Functions contain multiple empty lines in a row." >
55
+ <![CDATA[
56
+ function myFunction()
57
+ {
58
+ echo 'code here';
59
+ <em>
60
+
61
+ </em>echo 'code here';
62
+ }
63
+ ]]>
64
+ </code >
65
+ </code_comparison >
66
+ </documentation >
You can’t perform that action at this time.
0 commit comments