File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed
src/Standards/Generic/Docs/WhiteSpace Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 1+ <documentation title =" Language Construct Spacing" >
2+ <standard >
3+ <![CDATA[
4+ Language constructs that can be used without parentheses, must have a single space between the language construct keyword and its content.
5+ ]]>
6+ </standard >
7+ <code_comparison >
8+ <code title =" Valid: Single space after language construct." >
9+ <![CDATA[
10+ echo<em> </em>'Hello, World!';
11+ throw<em> </em>new<em> </em>Exception();
12+ return<em> </em>$newLine;
13+ ]]>
14+ </code >
15+ <code title =" Invalid: No space, more than one space or newline after language construct." >
16+ <![CDATA[
17+ echo<em></em>'Hello, World!';
18+ throw<em> </em>new<em> </em>Exception();
19+ return<em></em>
20+ $newLine;
21+ ]]>
22+ </code >
23+ </code_comparison >
24+ <standard >
25+ <![CDATA[
26+ A single space must be used between the "yield" and "from" keywords for a "yield from" expression.
27+ ]]>
28+ </standard >
29+ <code_comparison >
30+ <code title =" Valid: Single space between yield and from." >
31+ <![CDATA[
32+ yield<em> </em>from [1, 2, 3];
33+ ]]>
34+ </code >
35+ <code title =" Invalid: No space, more than one space or newline between yield and from." >
36+ <![CDATA[
37+ yield<em></em>from [1, 2, 3];
38+ yield<em> </em>from [1, 2, 3];
39+ yield<em></em>
40+ from [1, 2, 3];
41+ ]]>
42+ </code >
43+ </code_comparison >
44+ </documentation >
You can’t perform that action at this time.
0 commit comments