~ubuntu-branches/ubuntu/wily/php-codesniffer/wily-proposed

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-2.3.3/CodeSniffer/Standards/Squiz/Docs/WhiteSpace/FunctionOpeningBraceStandard.xml

  • Committer: Package Import Robot
  • Author(s): David Prévot, Greg Sherwood
  • Date: 2015-06-24 13:41:36 UTC
  • mfrom: (1.1.9)
  • Revision ID: package-import@ubuntu.com-20150624134136-dv60dnl6s20tdxwr
Tags: 2.3.3-1
[ Greg Sherwood ]
Prepare for 2.3.3 release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<documentation title="Function Opening Brace Whitespace">
 
2
    <standard>
 
3
    <![CDATA[
 
4
    The opening brace for functions should be on a new line with no blank lines surrounding it.
 
5
    ]]>
 
6
    </standard>
 
7
    <code_comparison>
 
8
        <code title="Valid: Opening brace is on a new line.">
 
9
        <![CDATA[
 
10
function foo()
 
11
<em>{</em>
 
12
}
 
13
]]>
 
14
        </code>
 
15
        <code title="Invalid: Opening brace is on the same line as the function declaration.">
 
16
        <![CDATA[
 
17
function foo() <em>{</em>
 
18
}
 
19
]]>
 
20
        </code>
 
21
    </code_comparison>
 
22
    <code_comparison>
 
23
        <code title="Valid: No blank lines after the opening brace.">
 
24
        <![CDATA[
 
25
function foo()
 
26
{
 
27
<em>    return 42;</em>
 
28
}
 
29
]]>
 
30
        </code>
 
31
        <code title="Invalid: A blank line after the opening brace.">
 
32
        <![CDATA[
 
33
function foo()
 
34
{
 
35
<em></em>
 
36
    return 42;
 
37
}
 
38
]]>
 
39
        </code>
 
40
    </code_comparison>
 
41
</documentation>