File tree Expand file tree Collapse file tree 2 files changed +28
-14
lines changed
src/Standards/Generic/Tests/Metrics Expand file tree Collapse file tree 2 files changed +28
-14
lines changed File renamed without changes.
Original file line number Diff line number Diff line change @@ -26,11 +26,18 @@ final class CyclomaticComplexityUnitTest extends AbstractSniffUnitTest
26
26
* The key of the array should represent the line number and the value
27
27
* should represent the number of errors that should occur on that line.
28
28
*
29
+ * @param string $testFile The name of the file being tested.
30
+ *
29
31
* @return array<int, int>
30
32
*/
31
- public function getErrorList ()
33
+ public function getErrorList ($ testFile = '' )
32
34
{
33
- return [118 => 1 ];
35
+ switch ($ testFile ) {
36
+ case 'CyclomaticComplexityUnitTest.1.inc ' :
37
+ return [118 => 1 ];
38
+ default :
39
+ return [];
40
+ }
34
41
35
42
}//end getErrorList()
36
43
@@ -41,21 +48,28 @@ public function getErrorList()
41
48
* The key of the array should represent the line number and the value
42
49
* should represent the number of warnings that should occur on that line.
43
50
*
51
+ * @param string $testFile The name of the file being tested.
52
+ *
44
53
* @return array<int, int>
45
54
*/
46
- public function getWarningList ()
55
+ public function getWarningList ($ testFile = '' )
47
56
{
48
- return [
49
- 45 => 1 ,
50
- 72 => 1 ,
51
- 189 => 1 ,
52
- 237 => 1 ,
53
- 285 => 1 ,
54
- 333 => 1 ,
55
- 381 => 1 ,
56
- 417 => 1 ,
57
- 445 => 1 ,
58
- ];
57
+ switch ($ testFile ) {
58
+ case 'CyclomaticComplexityUnitTest.1.inc ' :
59
+ return [
60
+ 45 => 1 ,
61
+ 72 => 1 ,
62
+ 189 => 1 ,
63
+ 237 => 1 ,
64
+ 285 => 1 ,
65
+ 333 => 1 ,
66
+ 381 => 1 ,
67
+ 417 => 1 ,
68
+ 445 => 1 ,
69
+ ];
70
+ default :
71
+ return [];
72
+ }
59
73
60
74
}//end getWarningList()
61
75
You can’t perform that action at this time.
0 commit comments