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

« back to all changes in this revision

Viewing changes to PHP_CodeSniffer-1.5.0RC2/CodeSniffer/Standards/Generic/Docs/PHP/UpperCaseConstantStandard.xml

  • Committer: Package Import Robot
  • Author(s): David Prévot
  • Date: 2014-07-21 14:42:41 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20140721144241-g4orlcuk4jzn9mhs
Tags: 1.5.3-1
* Team upload
* Focus on stable release
* Update copyright
* Bump standards version to 3.9.5
* Update Homepage
* Use ${phppear:…} instead of hardcoding them
* Run tests in dh_auto_test
* Update patch with gbp pq
* Simplify configuration installation
* Edit package.xml to move script
* Add DEP-8 tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<documentation title="PHP Constants">
2
 
    <standard>
3
 
    <![CDATA[
4
 
    The <em>true</em>, <em>false</em> and <em>null</em> constants must always be uppercase.
5
 
    ]]>
6
 
    </standard>
7
 
    <code_comparison>
8
 
        <code title="Valid: uppercase constants">
9
 
        <![CDATA[
10
 
if ($var === <em>FALSE</em> || $var === <em>NULL</em>) {
11
 
    $var = <em>TRUE</em>;
12
 
}
13
 
        ]]>
14
 
        </code>
15
 
        <code title="Invalid: lowercase constants">
16
 
        <![CDATA[
17
 
if ($var === <em>false</em> || $var === <em>null</em>) {
18
 
    $var = <em>true</em>;
19
 
}
20
 
        ]]>
21
 
        </code>
22
 
    </code_comparison>
23
 
</documentation>