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

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-2.3.2/CodeSniffer/Standards/PSR1/Docs/Files/SideEffectsStandard.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="Side Effects">
2
 
    <standard>
3
 
    <![CDATA[
4
 
    A php file should either contain declarations with no side effects, or should just have logic (including side effects) with no declarations.
5
 
    ]]>
6
 
    </standard>
7
 
    <code_comparison>
8
 
        <code title="Valid: A class defined in a file by itself.">
9
 
        <![CDATA[
10
 
<?php
11
 
class Foo
12
 
{
13
 
}
14
 
        ]]>
15
 
        </code>
16
 
        <code title="Invalid: A class defined in a file with other code.">
17
 
        <![CDATA[
18
 
<?php
19
 
class Foo
20
 
{
21
 
}
22
 
 
23
 
<em>echo "Class Foo loaded."</em>
24
 
        ]]>
25
 
        </code>
26
 
    </code_comparison>
27
 
</documentation>