~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/Squiz/Tests/PHP/NonExecutableCodeUnitTest.php

  • 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
 
<?php
2
 
/**
3
 
 * Unit test class for the NonExecutableCode sniff.
4
 
 *
5
 
 * PHP version 5
6
 
 *
7
 
 * @category  PHP
8
 
 * @package   PHP_CodeSniffer
9
 
 * @author    Greg Sherwood <gsherwood@squiz.net>
10
 
 * @author    Marc McIntyre <mmcintyre@squiz.net>
11
 
 * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
12
 
 * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
13
 
 * @link      http://pear.php.net/package/PHP_CodeSniffer
14
 
 */
15
 
 
16
 
/**
17
 
 * Unit test class for the NonExecutableCode sniff.
18
 
 *
19
 
 * A sniff unit test checks a .inc file for expected violations of a single
20
 
 * coding standard. Expected errors and warnings are stored in this class.
21
 
 *
22
 
 * @category  PHP
23
 
 * @package   PHP_CodeSniffer
24
 
 * @author    Greg Sherwood <gsherwood@squiz.net>
25
 
 * @author    Marc McIntyre <mmcintyre@squiz.net>
26
 
 * @copyright 2006-2012 Squiz Pty Ltd (ABN 77 084 670 600)
27
 
 * @license   https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
28
 
 * @version   Release: 1.5.0RC2
29
 
 * @link      http://pear.php.net/package/PHP_CodeSniffer
30
 
 */
31
 
class Squiz_Tests_PHP_NonExecutableCodeUnitTest extends AbstractSniffUnitTest
32
 
{
33
 
 
34
 
 
35
 
    /**
36
 
     * Returns the lines where errors should occur.
37
 
     *
38
 
     * The key of the array should represent the line number and the value
39
 
     * should represent the number of errors that should occur on that line.
40
 
     *
41
 
     * @return array(int => int)
42
 
     */
43
 
    public function getErrorList()
44
 
    {
45
 
        return array();
46
 
 
47
 
    }//end getErrorList()
48
 
 
49
 
 
50
 
    /**
51
 
     * Returns the lines where warnings should occur.
52
 
     *
53
 
     * The key of the array should represent the line number and the value
54
 
     * should represent the number of warnings that should occur on that line.
55
 
     *
56
 
     * @return array(int => int)
57
 
     */
58
 
    public function getWarningList()
59
 
    {
60
 
        return array(
61
 
                5   => 1,
62
 
                11  => 1,
63
 
                17  => 1,
64
 
                18  => 1,
65
 
                19  => 2,
66
 
                28  => 1,
67
 
                32  => 1,
68
 
                33  => 2,
69
 
                34  => 2,
70
 
                42  => 1,
71
 
                45  => 1,
72
 
                54  => 1,
73
 
                58  => 1,
74
 
                73  => 1,
75
 
                83  => 1,
76
 
                95  => 1,
77
 
                105 => 1,
78
 
                123 => 1,
79
 
                146 => 1,
80
 
                149 => 1,
81
 
                152 => 1,
82
 
                165 => 1,
83
 
                179 => 1,
84
 
                221 => 1,
85
 
                222 => 1,
86
 
                223 => 1,
87
 
                224 => 2,
88
 
                228 => 1,
89
 
               );
90
 
 
91
 
    }//end getWarningList()
92
 
 
93
 
 
94
 
}//end class
95
 
 
96
 
?>