You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml
+8-6Lines changed: 8 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -1,22 +1,24 @@
1
-
<documentationtitle="Opening Brace in Function Declarations">
1
+
<documentationtitle="Opening Function Brace Kerninghan Ritchie">
2
2
<standard>
3
3
<![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.
5
7
]]>
6
8
</standard>
7
9
<code_comparison>
8
-
<codetitle="Valid: Brace on same line.">
10
+
<codetitle="Valid: Opening brace on the same line.">
9
11
<![CDATA[
10
12
function fooFunction($arg1, $arg2 = '')<em> {</em>
11
-
...
13
+
// Do something.
12
14
}
13
15
]]>
14
16
</code>
15
-
<codetitle="Invalid: Brace on next line.">
17
+
<codetitle="Invalid: Opening brace on the next line.">
0 commit comments