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

CodingStandard_Tests_PHP_NoSilencedErrorsUnitTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 42
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A NoSilencedErrorsUnitTest::getErrorList() 0 4 1
A NoSilencedErrorsUnitTest::getWarningList() 0 7 1
1
<?php
2
/**
3
 * Unit test class for the NoSilencedErrors sniff.
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\PHP;
15
16
use TestSuite\AbstractSniffUnitTest;
17
18
/**
19
 * Unit test class for the NoSilencedErrors sniff.
20
 *
21
 * A sniff unit test checks a .inc file for expected violations of a single
22
 * coding standard. Expected errors and warnings are stored in this class.
23
 *
24
 * @category PHP
25
 * @package  PHP_CodeSniffer
26
 * @author   Alexander Obuhovich <[email protected]>
27
 * @license  https://github.com/aik099/CodingStandard/blob/master/LICENSE BSD 3-Clause
28
 * @link     https://github.com/aik099/CodingStandard
29
 */
30
class NoSilencedErrorsUnitTest extends AbstractSniffUnitTest
31
{
32
33
34
    /**
35
     * Returns the lines where errors should occur.
36
     *
37
     * The key of the array should represent the line number and the value
38
     * should represent the number of errors that should occur on that line.
39
     *
40
     * @param string $testFile Name of the file with test data.
41
     *
42
     * @return array<int, int>
0 ignored issues
show
Documentation introduced by
The doc-type array<int, could not be parsed: Expected ">" at position 5, but found "end of type". (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
43
     */
44
    public function getErrorList($testFile)
45
    {
46
        return array();
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
     * @param string $testFile Name of the file with test data.
57
     *
58
     * @return array<int, int>
0 ignored issues
show
Documentation introduced by
The doc-type array<int, could not be parsed: Expected ">" at position 5, but found "end of type". (view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
59
     */
60
    public function getWarningList($testFile)
61
    {
62
        return array(
63
                5  => 1,
64
                11 => 1,
65
               );
66
    }//end getWarningList()
67
}//end class
68