~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/Tests/Formatting/NoSpaceAfterCastUnitTest.php

  • 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
 
<?php
2
 
/**
3
 
 * Unit test class for the NoSpaceAfterCast 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 NoSpaceAfterCast 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 Generic_Tests_Formatting_NoSpaceAfterCastUnitTest 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
 
                3  => 1,
47
 
                5  => 1,
48
 
                7  => 1,
49
 
                9  => 1,
50
 
                11 => 1,
51
 
                13 => 1,
52
 
                15 => 1,
53
 
                17 => 1,
54
 
                19 => 1,
55
 
                21 => 1,
56
 
                23 => 1,
57
 
                25 => 1,
58
 
                27 => 1,
59
 
                29 => 1,
60
 
                31 => 1,
61
 
                33 => 1,
62
 
                35 => 1,
63
 
                37 => 1,
64
 
                39 => 1,
65
 
                41 => 1,
66
 
                43 => 1,
67
 
                45 => 1,
68
 
               );
69
 
 
70
 
    }//end getErrorList()
71
 
 
72
 
 
73
 
    /**
74
 
     * Returns the lines where warnings should occur.
75
 
     *
76
 
     * The key of the array should represent the line number and the value
77
 
     * should represent the number of warnings that should occur on that line.
78
 
     *
79
 
     * @return array(int => int)
80
 
     */
81
 
    public function getWarningList()
82
 
    {
83
 
        return array();
84
 
 
85
 
    }//end getWarningList()
86
 
 
87
 
 
88
 
}//end class
89
 
 
90
 
?>