~ubuntu-branches/ubuntu/saucy/php-codesniffer/saucy

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.1.0/CodeSniffer/Standards/Generic/Docs/Functions/OpeningFunctionBraceKernighanRitchieStandard.xml

  • Committer: Bazaar Package Importer
  • Author(s): Jack Bates
  • Date: 2008-10-01 17:39:43 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20081001173943-2dy06n1e8zwyw1o8
Tags: 1.1.0-1
* New upstream release
* Acknowledge NMU, thanks Jan

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<documentation title="Opening Brace in Function Declarations">
 
2
    <standard>
 
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.
 
5
    ]]>
 
6
    </standard>
 
7
    <code_comparison>
 
8
        <code title="Valid: brace on same line">
 
9
        <![CDATA[
 
10
function fooFunction($arg1, $arg2 = '')<em> {</em>
 
11
    ...
 
12
}
 
13
        ]]>
 
14
        </code>
 
15
        <code title="Invalid: brace on next line">
 
16
        <![CDATA[
 
17
function fooFunction($arg1, $arg2 = '')
 
18
<em>{</em>
 
19
    ...
 
20
}
 
21
        ]]>
 
22
        </code>
 
23
    </code_comparison>
 
24
</documentation>