File: OpeningFunctionBraceBsdAllmanStandard.xml

package info (click to toggle)
php-codesniffer 1.3.4-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,092 kB
  • sloc: php: 30,445; xml: 3,768; makefile: 15; pascal: 8; sh: 6
file content (24 lines) | stat: -rw-r--r-- 695 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<documentation title="Opening Brace in Function Declarations">
    <standard>
    <![CDATA[
    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.
    ]]>
    </standard>
    <code_comparison>
        <code title="Valid: brace on next line">
        <![CDATA[
function fooFunction($arg1, $arg2 = '')
<em>{</em>
    ...
}
        ]]>
        </code>
        <code title="Invalid: brace on same line">
        <![CDATA[
function fooFunction($arg1, $arg2 = '') <em>{</em>
    ...
}
        ]]>
        </code>
    </code_comparison>
</documentation>