Skip to content

Commit 97ae43f

Browse files
authored
Merge 33c4760 into f281e46
2 parents f281e46 + 33c4760 commit 97ae43f

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
1-
<documentation title="Opening Brace in Function Declarations">
1+
<documentation title="Opening Function Brace Kerninghan Ritchie">
22
<standard>
33
<![CDATA[
4-
Function declarations follow the "Kernighan/Ritchie style". The function brace is on the same line as the function declaration. One space is required between the closing parenthesis and the brace.
4+
The function opening brace must be on the same line as the end of the function declaration, with
5+
exactly one space between the end of the declaration and the brace. The brace must be the last
6+
content on the line.
57
]]>
68
</standard>
79
<code_comparison>
8-
<code title="Valid: Brace on same line.">
10+
<code title="Valid: Opening brace on the same line.">
911
<![CDATA[
1012
function fooFunction($arg1, $arg2 = '')<em> {</em>
11-
...
13+
// Do something.
1214
}
1315
]]>
1416
</code>
15-
<code title="Invalid: Brace on next line.">
17+
<code title="Invalid: Opening brace on the next line.">
1618
<![CDATA[
1719
function fooFunction($arg1, $arg2 = '')
1820
<em>{</em>
19-
...
21+
// Do something.
2022
}
2123
]]>
2224
</code>

0 commit comments

Comments
 (0)