Failed Conditions
Push — master ( a46fbb...c35fd9 )
by Alexander
01:13
created

ValidFunctionNameUnitTest::getWarningList()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * CodingStandard_Tests_NamingConventions_ValidFunctionNameUnitTest.
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\NamingConventions;
17
18
use TestSuite\AbstractSniffUnitTest;
19
20
/**
21
 * Unit test class for the ValidFunctionName 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 ValidFunctionNameUnitTest 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
        $errors = array(
51
                   11  => 1,
52
                   12  => 1,
53
                   13  => 1,
54
                   14  => 1,
55
                   15  => 1,
56
                   16  => 1,
57
                   17  => 1,
58
                   18  => 1,
59
                   19  => 1,
60
                   20  => 1,
61
                   24  => 1,
62
                   25  => 1,
63
                   26  => 1,
64
                   27  => 1,
65
                   28  => 1,
66
                   29  => 1,
67
                   30  => 1,
68
                   31  => 1,
69
                   32  => 1,
70
                   33  => 1,
71
                   35  => 1,
72
                   36  => 1,
73
                   37  => 1,
74
                   38  => 1,
75
                   39  => 1,
76
                   40  => 1,
77
                   43  => 1,
78
                   44  => 1,
79
                   45  => 1,
80
                   46  => 1,
81
                   50  => 1,
82
                   51  => 1,
83
                   52  => 1,
84
                   53  => 1,
85
                   56  => 1,
86
                   57  => 1,
87
                   58  => 1,
88
                   59  => 1,
89
                   67  => 1,
90
                   68  => 1,
91
                   69  => 1,
92
                   70  => 1,
93
                   71  => 1,
94
                   72  => 1,
95
                   73  => 1,
96
                   74  => 1,
97
                   75  => 1,
98
                   76  => 1,
99
                   80  => 1,
100
                   81  => 1,
101
                   82  => 1,
102
                   83  => 1,
103
                   84  => 1,
104
                   85  => 1,
105
                   86  => 1,
106
                   87  => 1,
107
                   88  => 1,
108
                   89  => 1,
109
                   91  => 1,
110
                   92  => 1,
111
                   93  => 1,
112
                   94  => 1,
113
                   95  => 1,
114
                   96  => 1,
115
                   99  => 1,
116
                   100 => 1,
117
                   101 => 1,
118
                   102 => 1,
119
                   106 => 1,
120
                   107 => 1,
121
                   108 => 1,
122
                   109 => 1,
123
                   112 => 1,
124
                   113 => 1,
125
                   114 => 1,
126
                   115 => 1,
127
                   121 => 1,
128
                   122 => 1,
129
                   123 => 1,
130
                   124 => 1,
131
                   125 => 1,
132
                   126 => 1,
133
                   127 => 2,
134
                   128 => 2,
135
                   129 => 2,
136
                   130 => 2,
137
                   149 => 1,
138
                   151 => 1,
139
                   152 => 1,
140
                   155 => 1,
141
                   156 => 1,
142
                   157 => 1,
143
                   158 => 1,
144
                   159 => 1,
145
                   160 => 1,
146
                   161 => 1,
147
                   162 => 1,
148
                   163 => 1,
149
                   164 => 1,
150
                   165 => 1,
151
                   166 => 3,
152
                   167 => 1,
153
                   169 => 1,
154
                   170 => 1,
155
                   171 => 3,
156
                   173 => 2,
157
                   174 => 1,
158
                   175 => 1,
159
                  );
160
161
        return $errors;
162
    }//end getErrorList()
163
164
165
    /**
166
     * Returns the lines where warnings should occur.
167
     *
168
     * The key of the array should represent the line number and the value
169
     * should represent the number of warnings that should occur on that line.
170
     *
171
     * @param string $testFile Name of the file with test data.
172
     *
173
     * @return array(int => int)
174
     */
175
    public function getWarningList($testFile)
176
    {
177
        return array();
178
    }//end getWarningList()
179
}//end class
180