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

ItemAssignmentUnitTest::getErrorList()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 19

Duplication

Lines 0
Ratio 0 %

Importance

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