Skip to content

Commit 71fcf9a

Browse files
authored
Merge pull request #953 from rodrigoprimo/documentation-opening-function-brace-bsd-allman
Generic/OpeningFunctionBraceBsdAllman: improve XML documentation
2 parents 50d6d43 + f647362 commit 71fcf9a

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

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

+8-6
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 Bsd Allman">
22
<standard>
33
<![CDATA[
4-
Function declarations follow the "BSD/Allman style". The function brace is on the line following the function declaration and is indented to the same column as the start of the function declaration.
4+
Function declarations must follow the "BSD/Allman style". The opening brace is on the line
5+
following the function declaration and is indented to the same column as the start of the
6+
function declaration. The brace must be the last content on the line.
57
]]>
68
</standard>
79
<code_comparison>
8-
<code title="Valid: Brace on next line.">
10+
<code title="Valid: Opening brace on the next line.">
911
<![CDATA[
1012
function fooFunction($arg1, $arg2 = '')
1113
<em>{</em>
12-
...
14+
// Do something
1315
}
1416
]]>
1517
</code>
16-
<code title="Invalid: Brace on same line.">
18+
<code title="Invalid: Opening brace on the same line.">
1719
<![CDATA[
1820
function fooFunction($arg1, $arg2 = '') <em>{</em>
19-
...
21+
// Do something
2022
}
2123
]]>
2224
</code>

0 commit comments

Comments
 (0)