Skip to content

Commit f647362

Browse files
committed
Generic/OpeningFunctionBraceBsdAllman: improve XML doc
- `<documentation>` title matches the sniff name. - Mention in the `<standard>` description that there must be no content on the line after the opening brace and makes some other minor adjustments to the description text. - Improve the title of the `<code>` blocks.
1 parent eddb012 commit f647362

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

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

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
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>
1214
// 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>
1921
// Do something

0 commit comments

Comments
 (0)