Passed
Push — master ( b371b3...259207 )
by Michael
02:50 queued 15s
created

AlphabeticalUseStatementsUnitTest::getErrorList()   B

Complexity

Conditions 8
Paths 8

Size

Total Lines 44
Code Lines 33

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 8
eloc 33
c 1
b 0
f 0
nc 8
nop 1
dl 0
loc 44
rs 8.1475
1
<?php
2
3
/**
4
 * This file is part of the mo4-coding-standard (phpcs standard)
5
 *
6
 * @author  Xaver Loppenstedt <[email protected]>
7
 *
8
 * @license http://spdx.org/licenses/MIT MIT License
9
 *
10
 * @link    https://github.com/mayflower/mo4-coding-standard
11
 */
12
13
declare(strict_types=1);
14
15
namespace MO4\Tests\Formatting;
16
17
use MO4\Tests\AbstractMo4SniffUnitTest;
18
19
/**
20
 * Unit test class for the AlphabeticalUseStatements sniff.
21
 *
22
 * A sniff unit test checks a .inc file for expected violations of a single
23
 * coding standard. Expected errors and warnings are stored in this class.
24
 *
25
 * @author    Xaver Loppenstedt <[email protected]>
26
 *
27
 * @copyright 2013-2021 Xaver Loppenstedt, some rights reserved.
28
 *
29
 * @license   http://spdx.org/licenses/MIT MIT License
30
 *
31
 * @link      https://github.com/mayflower/mo4-coding-standard
32
 */
33
class AlphabeticalUseStatementsUnitTest extends AbstractMo4SniffUnitTest
34
{
35
    protected $expectedErrorList = [
36
        'AlphabeticalUseStatementsUnitTest.pass.inc'   => [],
37
        'AlphabeticalUseStatementsUnitTest.pass.1.inc' => [],
38
        'AlphabeticalUseStatementsUnitTest.fail.1.inc' => [
39
            4  => 1,
40
            5  => 1,
41
            8  => 1,
42
            9  => 1,
43
            12 => 1,
44
        ],
45
        // Take care, more than one fix will be applied.
46
        'AlphabeticalUseStatementsUnitTest.fail.2.inc' => [
47
            6 => 1,
48
            8 => 1,
49
        ],
50
        'AlphabeticalUseStatementsUnitTest.fail.3.inc' => [
51
            7  => 1,
52
            8  => 1,
53
            10 => 1,
54
            15 => 1,
55
        ],
56
        'AlphabeticalUseStatementsUnitTest.fail.4.inc' => [
57
            4  => 1,
58
            8  => 1,
59
            13 => 1,
60
            17 => 1,
61
            20 => 1,
62
            21 => 1,
63
        ],
64
        'AlphabeticalUseStatementsUnitTest.fail.6.inc' => [5 => 1],
65
    ];
66
}
67