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

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.5.3/CodeSniffer/Standards/PSR2/Docs/Classes/ClassDeclarationStandard.xml

  • Committer: Package Import Robot
  • Author(s): David Prévot
  • Date: 2014-07-21 14:42:41 UTC
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: package-import@ubuntu.com-20140721144241-t0v9knmgtzftbsw6
Tags: upstream-1.5.3
Import upstream version 1.5.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<documentation title="Class Declarations">
 
2
    <standard>
 
3
    <![CDATA[
 
4
    There should be exactly 1 space between the abstract or final keyword and the class keyword and between the class keyword and the class name.  The extends and implements keywords, if present, must be on the same line as the class name.  When interfaces implemented are spread over multiple lines, there should be exactly 1 interface metioned per line indented by 1 level.  The closing brace of the class must go on the first line after the body of the class and must be on a line by itself.
 
5
    ]]>
 
6
    </standard>
 
7
    <code_comparison>
 
8
        <code title="Valid: Correct spacing around class keyword.">
 
9
        <![CDATA[
 
10
abstract<em> </em>class<em> </em>Foo
 
11
{
 
12
}
 
13
        ]]>
 
14
        </code>
 
15
        <code title="Invalid: 2 spaces used around class keyword.">
 
16
        <![CDATA[
 
17
abstract<em>  </em>class<em>  </em>Foo
 
18
{
 
19
}
 
20
        ]]>
 
21
        </code>
 
22
    </code_comparison>
 
23
</documentation>