Failed Conditions
Push — phpcs-3-upgrade ( d91341 )
by Alexander
02:06
created

ObjectOperatorSpacingUnitTest::getErrorList()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Unit test class for the ObjectOperatorSpacing sniff.
4
 *
5
 * PHP version 5
6
 *
7
 * @category PHP
8
 * @package  PHP_CodeSniffer
9
 * @author   Greg Sherwood <[email protected]>
10
 * @author   Marc McIntyre <[email protected]>
11
 * @author   Alexander Obuhovich <[email protected]>
12
 * @license  https://github.com/aik099/CodingStandard/blob/master/LICENSE BSD 3-Clause
13
 * @link     https://github.com/aik099/CodingStandard
14
 */
15
16
namespace CodingStandard\Tests\WhiteSpace;
17
18
use TestSuite\AbstractSniffUnitTest;
19
20
/**
21
 * Unit test class for the ObjectOperatorSpacing sniff.
22
 *
23
 * A sniff unit test checks a .inc file for expected violations of a single
24
 * coding standard. Expected errors and warnings are stored in this class.
25
 *
26
 * @category PHP
27
 * @package  PHP_CodeSniffer
28
 * @author   Greg Sherwood <[email protected]>
29
 * @author   Marc McIntyre <[email protected]>
30
 * @author   Alexander Obuhovich <[email protected]>
31
 * @license  https://github.com/aik099/CodingStandard/blob/master/LICENSE BSD 3-Clause
32
 * @link     https://github.com/aik099/CodingStandard
33
 */
34
class ObjectOperatorSpacingUnitTest extends AbstractSniffUnitTest
35
{
36
37
38
    /**
39
     * Returns the lines where errors should occur.
40
     *
41
     * The key of the array should represent the line number and the value
42
     * should represent the number of errors that should occur on that line.
43
     *
44
     * @param string $testFile Name of the file with test data.
45
     *
46
     * @return array(int => int)
47
     */
48
    public function getErrorList($testFile)
49
    {
50
        return array(
51
                3 => 1,
52
                4 => 2,
53
                6 => 2,
54
               );
55
    }//end getErrorList()
56
57
58
    /**
59
     * Returns the lines where warnings should occur.
60
     *
61
     * The key of the array should represent the line number and the value
62
     * should represent the number of warnings that should occur on that line.
63
     *
64
     * @param string $testFile Name of the file with test data.
65
     *
66
     * @return array(int => int)
67
     */
68
    public function getWarningList($testFile)
69
    {
70
        return array();
71
    }//end getWarningList()
72
}//end class
73