@@ -15,49 +15,49 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 7 => 1, |
|
30 | - 10 => 1, |
|
31 | - 15 => 1, |
|
32 | - 16 => 1, |
|
33 | - 23 => 1, |
|
34 | - 26 => 1, |
|
35 | - 31 => 1, |
|
36 | - 32 => 1, |
|
37 | - 39 => 1, |
|
38 | - 42 => 1, |
|
39 | - 47 => 1, |
|
40 | - 48 => 1, |
|
41 | - 70 => 1, |
|
42 | - 71 => 1, |
|
43 | - ]; |
|
44 | - |
|
45 | - }//end getErrorList() |
|
46 | - |
|
47 | - |
|
48 | - /** |
|
49 | - * Returns the lines where warnings should occur. |
|
50 | - * |
|
51 | - * The key of the array should represent the line number and the value |
|
52 | - * should represent the number of warnings that should occur on that line. |
|
53 | - * |
|
54 | - * @return array<int, int> |
|
55 | - */ |
|
56 | - public function getWarningList() |
|
57 | - { |
|
58 | - return []; |
|
59 | - |
|
60 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 7 => 1, |
|
30 | + 10 => 1, |
|
31 | + 15 => 1, |
|
32 | + 16 => 1, |
|
33 | + 23 => 1, |
|
34 | + 26 => 1, |
|
35 | + 31 => 1, |
|
36 | + 32 => 1, |
|
37 | + 39 => 1, |
|
38 | + 42 => 1, |
|
39 | + 47 => 1, |
|
40 | + 48 => 1, |
|
41 | + 70 => 1, |
|
42 | + 71 => 1, |
|
43 | + ]; |
|
44 | + |
|
45 | + }//end getErrorList() |
|
46 | + |
|
47 | + |
|
48 | + /** |
|
49 | + * Returns the lines where warnings should occur. |
|
50 | + * |
|
51 | + * The key of the array should represent the line number and the value |
|
52 | + * should represent the number of warnings that should occur on that line. |
|
53 | + * |
|
54 | + * @return array<int, int> |
|
55 | + */ |
|
56 | + public function getWarningList() |
|
57 | + { |
|
58 | + return []; |
|
59 | + |
|
60 | + }//end getWarningList() |
|
61 | 61 | |
62 | 62 | |
63 | 63 | }//end class |
@@ -7,9 +7,9 @@ |
||
7 | 7 | echo 'Bar'; |
8 | 8 | |
9 | 9 | for($i=0,$j=50; $i<100; $i++) { |
10 | - while($j--) { |
|
11 | - if($j==17) goto end; |
|
12 | - } |
|
10 | + while($j--) { |
|
11 | + if($j==17) goto end; |
|
12 | + } |
|
13 | 13 | } |
14 | 14 | echo "i = $i"; |
15 | 15 |
@@ -6,9 +6,9 @@ |
||
6 | 6 | a: |
7 | 7 | echo 'Bar'; |
8 | 8 | |
9 | -for($i=0,$j=50; $i<100; $i++) { |
|
10 | - while($j--) { |
|
11 | - if($j==17) goto end; |
|
9 | +for ($i = 0, $j = 50; $i < 100; $i++) { |
|
10 | + while ($j--) { |
|
11 | + if ($j == 17) goto end; |
|
12 | 12 | } |
13 | 13 | } |
14 | 14 | echo "i = $i"; |
@@ -8,7 +8,9 @@ |
||
8 | 8 | |
9 | 9 | for($i=0,$j=50; $i<100; $i++) { |
10 | 10 | while($j--) { |
11 | - if($j==17) goto end; |
|
11 | + if($j==17) { |
|
12 | + goto end; |
|
13 | + } |
|
12 | 14 | } |
13 | 15 | } |
14 | 16 | echo "i = $i"; |
@@ -44,7 +44,7 @@ |
||
44 | 44 | * |
45 | 45 | * @return array<int, int> |
46 | 46 | */ |
47 | - public function getErrorList($testFile='DisallowSpaceIndentUnitTest.1.inc') |
|
47 | + public function getErrorList($testFile = 'DisallowSpaceIndentUnitTest.1.inc') |
|
48 | 48 | { |
49 | 49 | switch ($testFile) { |
50 | 50 | case 'DisallowSpaceIndentUnitTest.1.inc': |
@@ -15,115 +15,115 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Get a list of CLI values to set before the file is tested. |
|
20 | - * |
|
21 | - * @param string $testFile The name of the file being tested. |
|
22 | - * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | - * |
|
24 | - * @return void |
|
25 | - */ |
|
26 | - public function setCliValues($testFile, $config) |
|
27 | - { |
|
28 | - if ($testFile === 'DisallowSpaceIndentUnitTest.2.inc') { |
|
29 | - return; |
|
30 | - } |
|
18 | + /** |
|
19 | + * Get a list of CLI values to set before the file is tested. |
|
20 | + * |
|
21 | + * @param string $testFile The name of the file being tested. |
|
22 | + * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | + * |
|
24 | + * @return void |
|
25 | + */ |
|
26 | + public function setCliValues($testFile, $config) |
|
27 | + { |
|
28 | + if ($testFile === 'DisallowSpaceIndentUnitTest.2.inc') { |
|
29 | + return; |
|
30 | + } |
|
31 | 31 | |
32 | - $config->tabWidth = 4; |
|
32 | + $config->tabWidth = 4; |
|
33 | 33 | |
34 | - }//end setCliValues() |
|
34 | + }//end setCliValues() |
|
35 | 35 | |
36 | 36 | |
37 | - /** |
|
38 | - * Returns the lines where errors should occur. |
|
39 | - * |
|
40 | - * The key of the array should represent the line number and the value |
|
41 | - * should represent the number of errors that should occur on that line. |
|
42 | - * |
|
43 | - * @param string $testFile The name of the file being tested. |
|
44 | - * |
|
45 | - * @return array<int, int> |
|
46 | - */ |
|
47 | - public function getErrorList($testFile='DisallowSpaceIndentUnitTest.1.inc') |
|
48 | - { |
|
49 | - switch ($testFile) { |
|
50 | - case 'DisallowSpaceIndentUnitTest.1.inc': |
|
51 | - case 'DisallowSpaceIndentUnitTest.2.inc': |
|
52 | - return [ |
|
53 | - 5 => 1, |
|
54 | - 9 => 1, |
|
55 | - 15 => 1, |
|
56 | - 22 => 1, |
|
57 | - 24 => 1, |
|
58 | - 30 => 1, |
|
59 | - 35 => 1, |
|
60 | - 50 => 1, |
|
61 | - 55 => 1, |
|
62 | - 57 => 1, |
|
63 | - 58 => 1, |
|
64 | - 59 => 1, |
|
65 | - 60 => 1, |
|
66 | - 65 => 1, |
|
67 | - 66 => 1, |
|
68 | - 67 => 1, |
|
69 | - 68 => 1, |
|
70 | - 69 => 1, |
|
71 | - 70 => 1, |
|
72 | - 73 => 1, |
|
73 | - 77 => 1, |
|
74 | - 81 => 1, |
|
75 | - 104 => 1, |
|
76 | - 105 => 1, |
|
77 | - 106 => 1, |
|
78 | - 107 => 1, |
|
79 | - 108 => 1, |
|
80 | - 110 => 1, |
|
81 | - 111 => 1, |
|
82 | - 112 => 1, |
|
83 | - 114 => 1, |
|
84 | - 115 => 1, |
|
85 | - 117 => 1, |
|
86 | - 118 => 1, |
|
87 | - ]; |
|
88 | - break; |
|
89 | - case 'DisallowSpaceIndentUnitTest.3.inc': |
|
90 | - return [ |
|
91 | - 2 => 1, |
|
92 | - 5 => 1, |
|
93 | - 10 => 1, |
|
94 | - 12 => 1, |
|
95 | - 13 => 1, |
|
96 | - 14 => 1, |
|
97 | - 15 => 1, |
|
98 | - ]; |
|
99 | - break; |
|
100 | - case 'DisallowSpaceIndentUnitTest.js': |
|
101 | - return [3 => 1]; |
|
102 | - break; |
|
103 | - case 'DisallowSpaceIndentUnitTest.css': |
|
104 | - return [2 => 1]; |
|
105 | - break; |
|
106 | - default: |
|
107 | - return []; |
|
108 | - break; |
|
109 | - }//end switch |
|
37 | + /** |
|
38 | + * Returns the lines where errors should occur. |
|
39 | + * |
|
40 | + * The key of the array should represent the line number and the value |
|
41 | + * should represent the number of errors that should occur on that line. |
|
42 | + * |
|
43 | + * @param string $testFile The name of the file being tested. |
|
44 | + * |
|
45 | + * @return array<int, int> |
|
46 | + */ |
|
47 | + public function getErrorList($testFile='DisallowSpaceIndentUnitTest.1.inc') |
|
48 | + { |
|
49 | + switch ($testFile) { |
|
50 | + case 'DisallowSpaceIndentUnitTest.1.inc': |
|
51 | + case 'DisallowSpaceIndentUnitTest.2.inc': |
|
52 | + return [ |
|
53 | + 5 => 1, |
|
54 | + 9 => 1, |
|
55 | + 15 => 1, |
|
56 | + 22 => 1, |
|
57 | + 24 => 1, |
|
58 | + 30 => 1, |
|
59 | + 35 => 1, |
|
60 | + 50 => 1, |
|
61 | + 55 => 1, |
|
62 | + 57 => 1, |
|
63 | + 58 => 1, |
|
64 | + 59 => 1, |
|
65 | + 60 => 1, |
|
66 | + 65 => 1, |
|
67 | + 66 => 1, |
|
68 | + 67 => 1, |
|
69 | + 68 => 1, |
|
70 | + 69 => 1, |
|
71 | + 70 => 1, |
|
72 | + 73 => 1, |
|
73 | + 77 => 1, |
|
74 | + 81 => 1, |
|
75 | + 104 => 1, |
|
76 | + 105 => 1, |
|
77 | + 106 => 1, |
|
78 | + 107 => 1, |
|
79 | + 108 => 1, |
|
80 | + 110 => 1, |
|
81 | + 111 => 1, |
|
82 | + 112 => 1, |
|
83 | + 114 => 1, |
|
84 | + 115 => 1, |
|
85 | + 117 => 1, |
|
86 | + 118 => 1, |
|
87 | + ]; |
|
88 | + break; |
|
89 | + case 'DisallowSpaceIndentUnitTest.3.inc': |
|
90 | + return [ |
|
91 | + 2 => 1, |
|
92 | + 5 => 1, |
|
93 | + 10 => 1, |
|
94 | + 12 => 1, |
|
95 | + 13 => 1, |
|
96 | + 14 => 1, |
|
97 | + 15 => 1, |
|
98 | + ]; |
|
99 | + break; |
|
100 | + case 'DisallowSpaceIndentUnitTest.js': |
|
101 | + return [3 => 1]; |
|
102 | + break; |
|
103 | + case 'DisallowSpaceIndentUnitTest.css': |
|
104 | + return [2 => 1]; |
|
105 | + break; |
|
106 | + default: |
|
107 | + return []; |
|
108 | + break; |
|
109 | + }//end switch |
|
110 | 110 | |
111 | - }//end getErrorList() |
|
111 | + }//end getErrorList() |
|
112 | 112 | |
113 | 113 | |
114 | - /** |
|
115 | - * Returns the lines where warnings should occur. |
|
116 | - * |
|
117 | - * The key of the array should represent the line number and the value |
|
118 | - * should represent the number of warnings that should occur on that line. |
|
119 | - * |
|
120 | - * @return array<int, int> |
|
121 | - */ |
|
122 | - public function getWarningList() |
|
123 | - { |
|
124 | - return []; |
|
114 | + /** |
|
115 | + * Returns the lines where warnings should occur. |
|
116 | + * |
|
117 | + * The key of the array should represent the line number and the value |
|
118 | + * should represent the number of warnings that should occur on that line. |
|
119 | + * |
|
120 | + * @return array<int, int> |
|
121 | + */ |
|
122 | + public function getWarningList() |
|
123 | + { |
|
124 | + return []; |
|
125 | 125 | |
126 | - }//end getWarningList() |
|
126 | + }//end getWarningList() |
|
127 | 127 | |
128 | 128 | |
129 | 129 | }//end class |
@@ -47,65 +47,65 @@ |
||
47 | 47 | public function getErrorList($testFile='DisallowSpaceIndentUnitTest.1.inc') |
48 | 48 | { |
49 | 49 | switch ($testFile) { |
50 | - case 'DisallowSpaceIndentUnitTest.1.inc': |
|
51 | - case 'DisallowSpaceIndentUnitTest.2.inc': |
|
52 | - return [ |
|
53 | - 5 => 1, |
|
54 | - 9 => 1, |
|
55 | - 15 => 1, |
|
56 | - 22 => 1, |
|
57 | - 24 => 1, |
|
58 | - 30 => 1, |
|
59 | - 35 => 1, |
|
60 | - 50 => 1, |
|
61 | - 55 => 1, |
|
62 | - 57 => 1, |
|
63 | - 58 => 1, |
|
64 | - 59 => 1, |
|
65 | - 60 => 1, |
|
66 | - 65 => 1, |
|
67 | - 66 => 1, |
|
68 | - 67 => 1, |
|
69 | - 68 => 1, |
|
70 | - 69 => 1, |
|
71 | - 70 => 1, |
|
72 | - 73 => 1, |
|
73 | - 77 => 1, |
|
74 | - 81 => 1, |
|
75 | - 104 => 1, |
|
76 | - 105 => 1, |
|
77 | - 106 => 1, |
|
78 | - 107 => 1, |
|
79 | - 108 => 1, |
|
80 | - 110 => 1, |
|
81 | - 111 => 1, |
|
82 | - 112 => 1, |
|
83 | - 114 => 1, |
|
84 | - 115 => 1, |
|
85 | - 117 => 1, |
|
86 | - 118 => 1, |
|
87 | - ]; |
|
88 | - break; |
|
89 | - case 'DisallowSpaceIndentUnitTest.3.inc': |
|
90 | - return [ |
|
91 | - 2 => 1, |
|
92 | - 5 => 1, |
|
93 | - 10 => 1, |
|
94 | - 12 => 1, |
|
95 | - 13 => 1, |
|
96 | - 14 => 1, |
|
97 | - 15 => 1, |
|
98 | - ]; |
|
99 | - break; |
|
100 | - case 'DisallowSpaceIndentUnitTest.js': |
|
101 | - return [3 => 1]; |
|
102 | - break; |
|
103 | - case 'DisallowSpaceIndentUnitTest.css': |
|
104 | - return [2 => 1]; |
|
105 | - break; |
|
106 | - default: |
|
107 | - return []; |
|
108 | - break; |
|
50 | + case 'DisallowSpaceIndentUnitTest.1.inc': |
|
51 | + case 'DisallowSpaceIndentUnitTest.2.inc': |
|
52 | + return [ |
|
53 | + 5 => 1, |
|
54 | + 9 => 1, |
|
55 | + 15 => 1, |
|
56 | + 22 => 1, |
|
57 | + 24 => 1, |
|
58 | + 30 => 1, |
|
59 | + 35 => 1, |
|
60 | + 50 => 1, |
|
61 | + 55 => 1, |
|
62 | + 57 => 1, |
|
63 | + 58 => 1, |
|
64 | + 59 => 1, |
|
65 | + 60 => 1, |
|
66 | + 65 => 1, |
|
67 | + 66 => 1, |
|
68 | + 67 => 1, |
|
69 | + 68 => 1, |
|
70 | + 69 => 1, |
|
71 | + 70 => 1, |
|
72 | + 73 => 1, |
|
73 | + 77 => 1, |
|
74 | + 81 => 1, |
|
75 | + 104 => 1, |
|
76 | + 105 => 1, |
|
77 | + 106 => 1, |
|
78 | + 107 => 1, |
|
79 | + 108 => 1, |
|
80 | + 110 => 1, |
|
81 | + 111 => 1, |
|
82 | + 112 => 1, |
|
83 | + 114 => 1, |
|
84 | + 115 => 1, |
|
85 | + 117 => 1, |
|
86 | + 118 => 1, |
|
87 | + ]; |
|
88 | + break; |
|
89 | + case 'DisallowSpaceIndentUnitTest.3.inc': |
|
90 | + return [ |
|
91 | + 2 => 1, |
|
92 | + 5 => 1, |
|
93 | + 10 => 1, |
|
94 | + 12 => 1, |
|
95 | + 13 => 1, |
|
96 | + 14 => 1, |
|
97 | + 15 => 1, |
|
98 | + ]; |
|
99 | + break; |
|
100 | + case 'DisallowSpaceIndentUnitTest.js': |
|
101 | + return [3 => 1]; |
|
102 | + break; |
|
103 | + case 'DisallowSpaceIndentUnitTest.css': |
|
104 | + return [2 => 1]; |
|
105 | + break; |
|
106 | + default: |
|
107 | + return []; |
|
108 | + break; |
|
109 | 109 | }//end switch |
110 | 110 | |
111 | 111 | }//end getErrorList() |
@@ -45,7 +45,7 @@ |
||
45 | 45 | * |
46 | 46 | * @return array<int, int> |
47 | 47 | */ |
48 | - public function getErrorList($testFile='ScopeIndentUnitTest.inc') |
|
48 | + public function getErrorList($testFile = 'ScopeIndentUnitTest.inc') |
|
49 | 49 | { |
50 | 50 | if ($testFile === 'ScopeIndentUnitTest.1.js') { |
51 | 51 | return [ |
@@ -15,200 +15,200 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Get a list of CLI values to set before the file is tested. |
|
20 | - * |
|
21 | - * @param string $testFile The name of the file being tested. |
|
22 | - * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | - * |
|
24 | - * @return void |
|
25 | - */ |
|
26 | - public function setCliValues($testFile, $config) |
|
27 | - { |
|
28 | - // Tab width setting is only needed for the tabbed file. |
|
29 | - if ($testFile === 'ScopeIndentUnitTest.2.inc') { |
|
30 | - $config->tabWidth = 4; |
|
31 | - } else { |
|
32 | - $config->tabWidth = 0; |
|
33 | - } |
|
34 | - |
|
35 | - }//end setCliValues() |
|
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 The name of the file being tested. |
|
45 | - * |
|
46 | - * @return array<int, int> |
|
47 | - */ |
|
48 | - public function getErrorList($testFile='ScopeIndentUnitTest.inc') |
|
49 | - { |
|
50 | - if ($testFile === 'ScopeIndentUnitTest.1.js') { |
|
51 | - return [ |
|
52 | - 6 => 1, |
|
53 | - 14 => 1, |
|
54 | - 21 => 1, |
|
55 | - 30 => 1, |
|
56 | - 32 => 1, |
|
57 | - 33 => 1, |
|
58 | - 34 => 1, |
|
59 | - 39 => 1, |
|
60 | - 42 => 1, |
|
61 | - 59 => 1, |
|
62 | - 60 => 1, |
|
63 | - 75 => 1, |
|
64 | - 120 => 1, |
|
65 | - 121 => 1, |
|
66 | - 122 => 1, |
|
67 | - 123 => 1, |
|
68 | - 141 => 1, |
|
69 | - 142 => 1, |
|
70 | - 155 => 1, |
|
71 | - 156 => 1, |
|
72 | - 168 => 1, |
|
73 | - 184 => 1, |
|
74 | - ]; |
|
75 | - }//end if |
|
76 | - |
|
77 | - if ($testFile === 'ScopeIndentUnitTest.3.inc') { |
|
78 | - return [ |
|
79 | - 6 => 1, |
|
80 | - 7 => 1, |
|
81 | - 10 => 1, |
|
82 | - ]; |
|
83 | - } |
|
84 | - |
|
85 | - if ($testFile === 'ScopeIndentUnitTest.4.inc') { |
|
86 | - return []; |
|
87 | - } |
|
88 | - |
|
89 | - return [ |
|
90 | - 7 => 1, |
|
91 | - 10 => 1, |
|
92 | - 13 => 1, |
|
93 | - 17 => 1, |
|
94 | - 20 => 1, |
|
95 | - 24 => 1, |
|
96 | - 25 => 1, |
|
97 | - 27 => 1, |
|
98 | - 28 => 1, |
|
99 | - 29 => 1, |
|
100 | - 30 => 1, |
|
101 | - 58 => 1, |
|
102 | - 123 => 1, |
|
103 | - 224 => 1, |
|
104 | - 225 => 1, |
|
105 | - 279 => 1, |
|
106 | - 280 => 1, |
|
107 | - 281 => 1, |
|
108 | - 282 => 1, |
|
109 | - 283 => 1, |
|
110 | - 284 => 1, |
|
111 | - 285 => 1, |
|
112 | - 286 => 1, |
|
113 | - 336 => 1, |
|
114 | - 349 => 1, |
|
115 | - 380 => 1, |
|
116 | - 386 => 1, |
|
117 | - 387 => 1, |
|
118 | - 388 => 1, |
|
119 | - 389 => 1, |
|
120 | - 390 => 1, |
|
121 | - 397 => 1, |
|
122 | - 419 => 1, |
|
123 | - 420 => 1, |
|
124 | - 465 => 1, |
|
125 | - 467 => 1, |
|
126 | - 472 => 1, |
|
127 | - 473 => 1, |
|
128 | - 474 => 1, |
|
129 | - 496 => 1, |
|
130 | - 498 => 1, |
|
131 | - 500 => 1, |
|
132 | - 524 => 1, |
|
133 | - 526 => 1, |
|
134 | - 544 => 1, |
|
135 | - 545 => 1, |
|
136 | - 546 => 1, |
|
137 | - 639 => 1, |
|
138 | - 660 => 1, |
|
139 | - 662 => 1, |
|
140 | - 802 => 1, |
|
141 | - 803 => 1, |
|
142 | - 823 => 1, |
|
143 | - 858 => 1, |
|
144 | - 879 => 1, |
|
145 | - 1163 => 1, |
|
146 | - 1197 => 1, |
|
147 | - 1198 => 1, |
|
148 | - 1259 => 1, |
|
149 | - 1264 => 1, |
|
150 | - 1265 => 1, |
|
151 | - 1266 => 1, |
|
152 | - 1269 => 1, |
|
153 | - 1272 => 1, |
|
154 | - 1273 => 1, |
|
155 | - 1274 => 1, |
|
156 | - 1275 => 1, |
|
157 | - 1276 => 1, |
|
158 | - 1277 => 1, |
|
159 | - 1280 => 1, |
|
160 | - 1281 => 1, |
|
161 | - 1282 => 1, |
|
162 | - 1284 => 1, |
|
163 | - 1285 => 1, |
|
164 | - 1288 => 1, |
|
165 | - 1289 => 1, |
|
166 | - 1290 => 1, |
|
167 | - 1292 => 1, |
|
168 | - 1293 => 1, |
|
169 | - 1310 => 1, |
|
170 | - 1312 => 1, |
|
171 | - 1327 => 1, |
|
172 | - 1328 => 1, |
|
173 | - 1329 => 1, |
|
174 | - 1330 => 1, |
|
175 | - 1331 => 1, |
|
176 | - 1332 => 1, |
|
177 | - 1335 => 1, |
|
178 | - 1340 => 1, |
|
179 | - 1342 => 1, |
|
180 | - 1345 => 1, |
|
181 | - 1488 => 1, |
|
182 | - 1489 => 1, |
|
183 | - 1500 => 1, |
|
184 | - 1503 => 1, |
|
185 | - 1518 => 1, |
|
186 | - 1520 => 1, |
|
187 | - 1527 => 1, |
|
188 | - 1529 => 1, |
|
189 | - 1530 => 1, |
|
190 | - 1567 => 1, |
|
191 | - 1568 => 1, |
|
192 | - 1569 => 1, |
|
193 | - 1570 => 1, |
|
194 | - ]; |
|
195 | - |
|
196 | - }//end getErrorList() |
|
197 | - |
|
198 | - |
|
199 | - /** |
|
200 | - * Returns the lines where warnings should occur. |
|
201 | - * |
|
202 | - * The key of the array should represent the line number and the value |
|
203 | - * should represent the number of warnings that should occur on that line. |
|
204 | - * |
|
205 | - * @return array<int, int> |
|
206 | - */ |
|
207 | - public function getWarningList() |
|
208 | - { |
|
209 | - return []; |
|
210 | - |
|
211 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Get a list of CLI values to set before the file is tested. |
|
20 | + * |
|
21 | + * @param string $testFile The name of the file being tested. |
|
22 | + * @param \PHP_CodeSniffer\Config $config The config data for the test run. |
|
23 | + * |
|
24 | + * @return void |
|
25 | + */ |
|
26 | + public function setCliValues($testFile, $config) |
|
27 | + { |
|
28 | + // Tab width setting is only needed for the tabbed file. |
|
29 | + if ($testFile === 'ScopeIndentUnitTest.2.inc') { |
|
30 | + $config->tabWidth = 4; |
|
31 | + } else { |
|
32 | + $config->tabWidth = 0; |
|
33 | + } |
|
34 | + |
|
35 | + }//end setCliValues() |
|
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 The name of the file being tested. |
|
45 | + * |
|
46 | + * @return array<int, int> |
|
47 | + */ |
|
48 | + public function getErrorList($testFile='ScopeIndentUnitTest.inc') |
|
49 | + { |
|
50 | + if ($testFile === 'ScopeIndentUnitTest.1.js') { |
|
51 | + return [ |
|
52 | + 6 => 1, |
|
53 | + 14 => 1, |
|
54 | + 21 => 1, |
|
55 | + 30 => 1, |
|
56 | + 32 => 1, |
|
57 | + 33 => 1, |
|
58 | + 34 => 1, |
|
59 | + 39 => 1, |
|
60 | + 42 => 1, |
|
61 | + 59 => 1, |
|
62 | + 60 => 1, |
|
63 | + 75 => 1, |
|
64 | + 120 => 1, |
|
65 | + 121 => 1, |
|
66 | + 122 => 1, |
|
67 | + 123 => 1, |
|
68 | + 141 => 1, |
|
69 | + 142 => 1, |
|
70 | + 155 => 1, |
|
71 | + 156 => 1, |
|
72 | + 168 => 1, |
|
73 | + 184 => 1, |
|
74 | + ]; |
|
75 | + }//end if |
|
76 | + |
|
77 | + if ($testFile === 'ScopeIndentUnitTest.3.inc') { |
|
78 | + return [ |
|
79 | + 6 => 1, |
|
80 | + 7 => 1, |
|
81 | + 10 => 1, |
|
82 | + ]; |
|
83 | + } |
|
84 | + |
|
85 | + if ($testFile === 'ScopeIndentUnitTest.4.inc') { |
|
86 | + return []; |
|
87 | + } |
|
88 | + |
|
89 | + return [ |
|
90 | + 7 => 1, |
|
91 | + 10 => 1, |
|
92 | + 13 => 1, |
|
93 | + 17 => 1, |
|
94 | + 20 => 1, |
|
95 | + 24 => 1, |
|
96 | + 25 => 1, |
|
97 | + 27 => 1, |
|
98 | + 28 => 1, |
|
99 | + 29 => 1, |
|
100 | + 30 => 1, |
|
101 | + 58 => 1, |
|
102 | + 123 => 1, |
|
103 | + 224 => 1, |
|
104 | + 225 => 1, |
|
105 | + 279 => 1, |
|
106 | + 280 => 1, |
|
107 | + 281 => 1, |
|
108 | + 282 => 1, |
|
109 | + 283 => 1, |
|
110 | + 284 => 1, |
|
111 | + 285 => 1, |
|
112 | + 286 => 1, |
|
113 | + 336 => 1, |
|
114 | + 349 => 1, |
|
115 | + 380 => 1, |
|
116 | + 386 => 1, |
|
117 | + 387 => 1, |
|
118 | + 388 => 1, |
|
119 | + 389 => 1, |
|
120 | + 390 => 1, |
|
121 | + 397 => 1, |
|
122 | + 419 => 1, |
|
123 | + 420 => 1, |
|
124 | + 465 => 1, |
|
125 | + 467 => 1, |
|
126 | + 472 => 1, |
|
127 | + 473 => 1, |
|
128 | + 474 => 1, |
|
129 | + 496 => 1, |
|
130 | + 498 => 1, |
|
131 | + 500 => 1, |
|
132 | + 524 => 1, |
|
133 | + 526 => 1, |
|
134 | + 544 => 1, |
|
135 | + 545 => 1, |
|
136 | + 546 => 1, |
|
137 | + 639 => 1, |
|
138 | + 660 => 1, |
|
139 | + 662 => 1, |
|
140 | + 802 => 1, |
|
141 | + 803 => 1, |
|
142 | + 823 => 1, |
|
143 | + 858 => 1, |
|
144 | + 879 => 1, |
|
145 | + 1163 => 1, |
|
146 | + 1197 => 1, |
|
147 | + 1198 => 1, |
|
148 | + 1259 => 1, |
|
149 | + 1264 => 1, |
|
150 | + 1265 => 1, |
|
151 | + 1266 => 1, |
|
152 | + 1269 => 1, |
|
153 | + 1272 => 1, |
|
154 | + 1273 => 1, |
|
155 | + 1274 => 1, |
|
156 | + 1275 => 1, |
|
157 | + 1276 => 1, |
|
158 | + 1277 => 1, |
|
159 | + 1280 => 1, |
|
160 | + 1281 => 1, |
|
161 | + 1282 => 1, |
|
162 | + 1284 => 1, |
|
163 | + 1285 => 1, |
|
164 | + 1288 => 1, |
|
165 | + 1289 => 1, |
|
166 | + 1290 => 1, |
|
167 | + 1292 => 1, |
|
168 | + 1293 => 1, |
|
169 | + 1310 => 1, |
|
170 | + 1312 => 1, |
|
171 | + 1327 => 1, |
|
172 | + 1328 => 1, |
|
173 | + 1329 => 1, |
|
174 | + 1330 => 1, |
|
175 | + 1331 => 1, |
|
176 | + 1332 => 1, |
|
177 | + 1335 => 1, |
|
178 | + 1340 => 1, |
|
179 | + 1342 => 1, |
|
180 | + 1345 => 1, |
|
181 | + 1488 => 1, |
|
182 | + 1489 => 1, |
|
183 | + 1500 => 1, |
|
184 | + 1503 => 1, |
|
185 | + 1518 => 1, |
|
186 | + 1520 => 1, |
|
187 | + 1527 => 1, |
|
188 | + 1529 => 1, |
|
189 | + 1530 => 1, |
|
190 | + 1567 => 1, |
|
191 | + 1568 => 1, |
|
192 | + 1569 => 1, |
|
193 | + 1570 => 1, |
|
194 | + ]; |
|
195 | + |
|
196 | + }//end getErrorList() |
|
197 | + |
|
198 | + |
|
199 | + /** |
|
200 | + * Returns the lines where warnings should occur. |
|
201 | + * |
|
202 | + * The key of the array should represent the line number and the value |
|
203 | + * should represent the number of warnings that should occur on that line. |
|
204 | + * |
|
205 | + * @return array<int, int> |
|
206 | + */ |
|
207 | + public function getWarningList() |
|
208 | + { |
|
209 | + return []; |
|
210 | + |
|
211 | + }//end getWarningList() |
|
212 | 212 | |
213 | 213 | |
214 | 214 | }//end class |
@@ -15,39 +15,39 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return [ |
|
29 | - 3 => 1, |
|
30 | - 5 => 1, |
|
31 | - 7 => 1, |
|
32 | - 8 => 1, |
|
33 | - ]; |
|
34 | - |
|
35 | - }//end getErrorList() |
|
36 | - |
|
37 | - |
|
38 | - /** |
|
39 | - * Returns the lines where warnings should occur. |
|
40 | - * |
|
41 | - * The key of the array should represent the line number and the value |
|
42 | - * should represent the number of warnings that should occur on that line. |
|
43 | - * |
|
44 | - * @return array<int, int> |
|
45 | - */ |
|
46 | - public function getWarningList() |
|
47 | - { |
|
48 | - return []; |
|
49 | - |
|
50 | - }//end getWarningList() |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return [ |
|
29 | + 3 => 1, |
|
30 | + 5 => 1, |
|
31 | + 7 => 1, |
|
32 | + 8 => 1, |
|
33 | + ]; |
|
34 | + |
|
35 | + }//end getErrorList() |
|
36 | + |
|
37 | + |
|
38 | + /** |
|
39 | + * Returns the lines where warnings should occur. |
|
40 | + * |
|
41 | + * The key of the array should represent the line number and the value |
|
42 | + * should represent the number of warnings that should occur on that line. |
|
43 | + * |
|
44 | + * @return array<int, int> |
|
45 | + */ |
|
46 | + public function getWarningList() |
|
47 | + { |
|
48 | + return []; |
|
49 | + |
|
50 | + }//end getWarningList() |
|
51 | 51 | |
52 | 52 | |
53 | 53 | }//end class |
@@ -47,7 +47,7 @@ |
||
47 | 47 | * |
48 | 48 | * @return array<int, int> |
49 | 49 | */ |
50 | - public function getErrorList($testFile='') |
|
50 | + public function getErrorList($testFile = '') |
|
51 | 51 | { |
52 | 52 | switch ($testFile) { |
53 | 53 | case 'DisallowLongArraySyntaxUnitTest.1.inc': |
@@ -15,52 +15,52 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @param string $testFile The name of the file being tested. |
|
25 | - * |
|
26 | - * @return array<int, int> |
|
27 | - */ |
|
28 | - public function getErrorList($testFile='') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'DisallowLongArraySyntaxUnitTest.1.inc': |
|
32 | - return [ |
|
33 | - 2 => 1, |
|
34 | - 4 => 1, |
|
35 | - 6 => 1, |
|
36 | - 7 => 1, |
|
37 | - 12 => 1, |
|
38 | - ]; |
|
39 | - case 'DisallowLongArraySyntaxUnitTest.2.inc': |
|
40 | - return [ |
|
41 | - 2 => 1, |
|
42 | - 9 => 1, |
|
43 | - ]; |
|
44 | - default: |
|
45 | - return []; |
|
46 | - }//end switch |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'DisallowLongArraySyntaxUnitTest.1.inc': |
|
32 | + return [ |
|
33 | + 2 => 1, |
|
34 | + 4 => 1, |
|
35 | + 6 => 1, |
|
36 | + 7 => 1, |
|
37 | + 12 => 1, |
|
38 | + ]; |
|
39 | + case 'DisallowLongArraySyntaxUnitTest.2.inc': |
|
40 | + return [ |
|
41 | + 2 => 1, |
|
42 | + 9 => 1, |
|
43 | + ]; |
|
44 | + default: |
|
45 | + return []; |
|
46 | + }//end switch |
|
47 | 47 | |
48 | - }//end getErrorList() |
|
48 | + }//end getErrorList() |
|
49 | 49 | |
50 | 50 | |
51 | - /** |
|
52 | - * Returns the lines where warnings should occur. |
|
53 | - * |
|
54 | - * The key of the array should represent the line number and the value |
|
55 | - * should represent the number of warnings that should occur on that line. |
|
56 | - * |
|
57 | - * @return array<int, int> |
|
58 | - */ |
|
59 | - public function getWarningList() |
|
60 | - { |
|
61 | - return []; |
|
51 | + /** |
|
52 | + * Returns the lines where warnings should occur. |
|
53 | + * |
|
54 | + * The key of the array should represent the line number and the value |
|
55 | + * should represent the number of warnings that should occur on that line. |
|
56 | + * |
|
57 | + * @return array<int, int> |
|
58 | + */ |
|
59 | + public function getWarningList() |
|
60 | + { |
|
61 | + return []; |
|
62 | 62 | |
63 | - }//end getWarningList() |
|
63 | + }//end getWarningList() |
|
64 | 64 | |
65 | 65 | |
66 | 66 | }//end class |
@@ -28,21 +28,21 @@ |
||
28 | 28 | public function getErrorList($testFile='') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'DisallowLongArraySyntaxUnitTest.1.inc': |
|
32 | - return [ |
|
33 | - 2 => 1, |
|
34 | - 4 => 1, |
|
35 | - 6 => 1, |
|
36 | - 7 => 1, |
|
37 | - 12 => 1, |
|
38 | - ]; |
|
39 | - case 'DisallowLongArraySyntaxUnitTest.2.inc': |
|
40 | - return [ |
|
41 | - 2 => 1, |
|
42 | - 9 => 1, |
|
43 | - ]; |
|
44 | - default: |
|
45 | - return []; |
|
31 | + case 'DisallowLongArraySyntaxUnitTest.1.inc': |
|
32 | + return [ |
|
33 | + 2 => 1, |
|
34 | + 4 => 1, |
|
35 | + 6 => 1, |
|
36 | + 7 => 1, |
|
37 | + 12 => 1, |
|
38 | + ]; |
|
39 | + case 'DisallowLongArraySyntaxUnitTest.2.inc': |
|
40 | + return [ |
|
41 | + 2 => 1, |
|
42 | + 9 => 1, |
|
43 | + ]; |
|
44 | + default: |
|
45 | + return []; |
|
46 | 46 | }//end switch |
47 | 47 | |
48 | 48 | }//end getErrorList() |
@@ -40,7 +40,7 @@ |
||
40 | 40 | * |
41 | 41 | * @return array<int, int> |
42 | 42 | */ |
43 | - public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
|
43 | + public function getWarningList($testFile = 'MultipleStatementAlignmentUnitTest.inc') |
|
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | 46 | case 'MultipleStatementAlignmentUnitTest.inc': |
@@ -15,152 +15,152 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @return array<int, int> |
|
25 | - */ |
|
26 | - public function getErrorList() |
|
27 | - { |
|
28 | - return []; |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @return array<int, int> |
|
25 | + */ |
|
26 | + public function getErrorList() |
|
27 | + { |
|
28 | + return []; |
|
29 | 29 | |
30 | - }//end getErrorList() |
|
30 | + }//end getErrorList() |
|
31 | 31 | |
32 | 32 | |
33 | - /** |
|
34 | - * Returns the lines where warnings should occur. |
|
35 | - * |
|
36 | - * The key of the array should represent the line number and the value |
|
37 | - * should represent the number of warnings that should occur on that line. |
|
38 | - * |
|
39 | - * @param string $testFile The name of the file being tested. |
|
40 | - * |
|
41 | - * @return array<int, int> |
|
42 | - */ |
|
43 | - public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
|
44 | - { |
|
45 | - switch ($testFile) { |
|
46 | - case 'MultipleStatementAlignmentUnitTest.inc': |
|
47 | - return [ |
|
48 | - 11 => 1, |
|
49 | - 12 => 1, |
|
50 | - 23 => 1, |
|
51 | - 24 => 1, |
|
52 | - 26 => 1, |
|
53 | - 27 => 1, |
|
54 | - 37 => 1, |
|
55 | - 38 => 1, |
|
56 | - 48 => 1, |
|
57 | - 50 => 1, |
|
58 | - 51 => 1, |
|
59 | - 61 => 1, |
|
60 | - 62 => 1, |
|
61 | - 64 => 1, |
|
62 | - 65 => 1, |
|
63 | - 71 => 1, |
|
64 | - 78 => 1, |
|
65 | - 79 => 1, |
|
66 | - 86 => 1, |
|
67 | - 92 => 1, |
|
68 | - 93 => 1, |
|
69 | - 94 => 1, |
|
70 | - 95 => 1, |
|
71 | - 123 => 1, |
|
72 | - 124 => 1, |
|
73 | - 126 => 1, |
|
74 | - 129 => 1, |
|
75 | - 154 => 1, |
|
76 | - 161 => 1, |
|
77 | - 178 => 1, |
|
78 | - 179 => 1, |
|
79 | - 182 => 1, |
|
80 | - 206 => 1, |
|
81 | - 207 => 1, |
|
82 | - 252 => 1, |
|
83 | - 257 => 1, |
|
84 | - 263 => 1, |
|
85 | - 269 => 1, |
|
86 | - 293 => 1, |
|
87 | - 295 => 1, |
|
88 | - 296 => 1, |
|
89 | - 297 => 1, |
|
90 | - 301 => 1, |
|
91 | - 303 => 1, |
|
92 | - 308 => 1, |
|
93 | - 311 => 1, |
|
94 | - 313 => 1, |
|
95 | - 314 => 1, |
|
96 | - 321 => 1, |
|
97 | - 322 => 1, |
|
98 | - 324 => 1, |
|
99 | - 329 => 1, |
|
100 | - 331 => 1, |
|
101 | - 336 => 1, |
|
102 | - 339 => 1, |
|
103 | - 341 => 1, |
|
104 | - 342 => 1, |
|
105 | - 349 => 1, |
|
106 | - 350 => 1, |
|
107 | - 352 => 1, |
|
108 | - 357 => 1, |
|
109 | - 364 => 1, |
|
110 | - 396 => 1, |
|
111 | - 398 => 1, |
|
112 | - 399 => 1, |
|
113 | - 401 => 1, |
|
114 | - 420 => 1, |
|
115 | - 422 => 1, |
|
116 | - 436 => 1, |
|
117 | - 438 => 1, |
|
118 | - 442 => 1, |
|
119 | - 443 => 1, |
|
120 | - 454 => 1, |
|
121 | - 487 => 1, |
|
122 | - 499 => 1, |
|
123 | - 500 => 1, |
|
124 | - ]; |
|
125 | - break; |
|
126 | - case 'MultipleStatementAlignmentUnitTest.js': |
|
127 | - return [ |
|
128 | - 11 => 1, |
|
129 | - 12 => 1, |
|
130 | - 23 => 1, |
|
131 | - 24 => 1, |
|
132 | - 26 => 1, |
|
133 | - 27 => 1, |
|
134 | - 37 => 1, |
|
135 | - 38 => 1, |
|
136 | - 48 => 1, |
|
137 | - 50 => 1, |
|
138 | - 51 => 1, |
|
139 | - 61 => 1, |
|
140 | - 62 => 1, |
|
141 | - 64 => 1, |
|
142 | - 65 => 1, |
|
143 | - 71 => 1, |
|
144 | - 78 => 1, |
|
145 | - 79 => 1, |
|
146 | - 81 => 1, |
|
147 | - 82 => 1, |
|
148 | - 83 => 1, |
|
149 | - 85 => 1, |
|
150 | - 86 => 1, |
|
151 | - 100 => 1, |
|
152 | - 112 => 1, |
|
153 | - 113 => 1, |
|
154 | - 114 => 1, |
|
155 | - 117 => 1, |
|
156 | - ]; |
|
157 | - break; |
|
158 | - default: |
|
159 | - return []; |
|
160 | - break; |
|
161 | - }//end switch |
|
33 | + /** |
|
34 | + * Returns the lines where warnings should occur. |
|
35 | + * |
|
36 | + * The key of the array should represent the line number and the value |
|
37 | + * should represent the number of warnings that should occur on that line. |
|
38 | + * |
|
39 | + * @param string $testFile The name of the file being tested. |
|
40 | + * |
|
41 | + * @return array<int, int> |
|
42 | + */ |
|
43 | + public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
|
44 | + { |
|
45 | + switch ($testFile) { |
|
46 | + case 'MultipleStatementAlignmentUnitTest.inc': |
|
47 | + return [ |
|
48 | + 11 => 1, |
|
49 | + 12 => 1, |
|
50 | + 23 => 1, |
|
51 | + 24 => 1, |
|
52 | + 26 => 1, |
|
53 | + 27 => 1, |
|
54 | + 37 => 1, |
|
55 | + 38 => 1, |
|
56 | + 48 => 1, |
|
57 | + 50 => 1, |
|
58 | + 51 => 1, |
|
59 | + 61 => 1, |
|
60 | + 62 => 1, |
|
61 | + 64 => 1, |
|
62 | + 65 => 1, |
|
63 | + 71 => 1, |
|
64 | + 78 => 1, |
|
65 | + 79 => 1, |
|
66 | + 86 => 1, |
|
67 | + 92 => 1, |
|
68 | + 93 => 1, |
|
69 | + 94 => 1, |
|
70 | + 95 => 1, |
|
71 | + 123 => 1, |
|
72 | + 124 => 1, |
|
73 | + 126 => 1, |
|
74 | + 129 => 1, |
|
75 | + 154 => 1, |
|
76 | + 161 => 1, |
|
77 | + 178 => 1, |
|
78 | + 179 => 1, |
|
79 | + 182 => 1, |
|
80 | + 206 => 1, |
|
81 | + 207 => 1, |
|
82 | + 252 => 1, |
|
83 | + 257 => 1, |
|
84 | + 263 => 1, |
|
85 | + 269 => 1, |
|
86 | + 293 => 1, |
|
87 | + 295 => 1, |
|
88 | + 296 => 1, |
|
89 | + 297 => 1, |
|
90 | + 301 => 1, |
|
91 | + 303 => 1, |
|
92 | + 308 => 1, |
|
93 | + 311 => 1, |
|
94 | + 313 => 1, |
|
95 | + 314 => 1, |
|
96 | + 321 => 1, |
|
97 | + 322 => 1, |
|
98 | + 324 => 1, |
|
99 | + 329 => 1, |
|
100 | + 331 => 1, |
|
101 | + 336 => 1, |
|
102 | + 339 => 1, |
|
103 | + 341 => 1, |
|
104 | + 342 => 1, |
|
105 | + 349 => 1, |
|
106 | + 350 => 1, |
|
107 | + 352 => 1, |
|
108 | + 357 => 1, |
|
109 | + 364 => 1, |
|
110 | + 396 => 1, |
|
111 | + 398 => 1, |
|
112 | + 399 => 1, |
|
113 | + 401 => 1, |
|
114 | + 420 => 1, |
|
115 | + 422 => 1, |
|
116 | + 436 => 1, |
|
117 | + 438 => 1, |
|
118 | + 442 => 1, |
|
119 | + 443 => 1, |
|
120 | + 454 => 1, |
|
121 | + 487 => 1, |
|
122 | + 499 => 1, |
|
123 | + 500 => 1, |
|
124 | + ]; |
|
125 | + break; |
|
126 | + case 'MultipleStatementAlignmentUnitTest.js': |
|
127 | + return [ |
|
128 | + 11 => 1, |
|
129 | + 12 => 1, |
|
130 | + 23 => 1, |
|
131 | + 24 => 1, |
|
132 | + 26 => 1, |
|
133 | + 27 => 1, |
|
134 | + 37 => 1, |
|
135 | + 38 => 1, |
|
136 | + 48 => 1, |
|
137 | + 50 => 1, |
|
138 | + 51 => 1, |
|
139 | + 61 => 1, |
|
140 | + 62 => 1, |
|
141 | + 64 => 1, |
|
142 | + 65 => 1, |
|
143 | + 71 => 1, |
|
144 | + 78 => 1, |
|
145 | + 79 => 1, |
|
146 | + 81 => 1, |
|
147 | + 82 => 1, |
|
148 | + 83 => 1, |
|
149 | + 85 => 1, |
|
150 | + 86 => 1, |
|
151 | + 100 => 1, |
|
152 | + 112 => 1, |
|
153 | + 113 => 1, |
|
154 | + 114 => 1, |
|
155 | + 117 => 1, |
|
156 | + ]; |
|
157 | + break; |
|
158 | + default: |
|
159 | + return []; |
|
160 | + break; |
|
161 | + }//end switch |
|
162 | 162 | |
163 | - }//end getWarningList() |
|
163 | + }//end getWarningList() |
|
164 | 164 | |
165 | 165 | |
166 | 166 | }//end class |
@@ -43,121 +43,121 @@ |
||
43 | 43 | public function getWarningList($testFile='MultipleStatementAlignmentUnitTest.inc') |
44 | 44 | { |
45 | 45 | switch ($testFile) { |
46 | - case 'MultipleStatementAlignmentUnitTest.inc': |
|
47 | - return [ |
|
48 | - 11 => 1, |
|
49 | - 12 => 1, |
|
50 | - 23 => 1, |
|
51 | - 24 => 1, |
|
52 | - 26 => 1, |
|
53 | - 27 => 1, |
|
54 | - 37 => 1, |
|
55 | - 38 => 1, |
|
56 | - 48 => 1, |
|
57 | - 50 => 1, |
|
58 | - 51 => 1, |
|
59 | - 61 => 1, |
|
60 | - 62 => 1, |
|
61 | - 64 => 1, |
|
62 | - 65 => 1, |
|
63 | - 71 => 1, |
|
64 | - 78 => 1, |
|
65 | - 79 => 1, |
|
66 | - 86 => 1, |
|
67 | - 92 => 1, |
|
68 | - 93 => 1, |
|
69 | - 94 => 1, |
|
70 | - 95 => 1, |
|
71 | - 123 => 1, |
|
72 | - 124 => 1, |
|
73 | - 126 => 1, |
|
74 | - 129 => 1, |
|
75 | - 154 => 1, |
|
76 | - 161 => 1, |
|
77 | - 178 => 1, |
|
78 | - 179 => 1, |
|
79 | - 182 => 1, |
|
80 | - 206 => 1, |
|
81 | - 207 => 1, |
|
82 | - 252 => 1, |
|
83 | - 257 => 1, |
|
84 | - 263 => 1, |
|
85 | - 269 => 1, |
|
86 | - 293 => 1, |
|
87 | - 295 => 1, |
|
88 | - 296 => 1, |
|
89 | - 297 => 1, |
|
90 | - 301 => 1, |
|
91 | - 303 => 1, |
|
92 | - 308 => 1, |
|
93 | - 311 => 1, |
|
94 | - 313 => 1, |
|
95 | - 314 => 1, |
|
96 | - 321 => 1, |
|
97 | - 322 => 1, |
|
98 | - 324 => 1, |
|
99 | - 329 => 1, |
|
100 | - 331 => 1, |
|
101 | - 336 => 1, |
|
102 | - 339 => 1, |
|
103 | - 341 => 1, |
|
104 | - 342 => 1, |
|
105 | - 349 => 1, |
|
106 | - 350 => 1, |
|
107 | - 352 => 1, |
|
108 | - 357 => 1, |
|
109 | - 364 => 1, |
|
110 | - 396 => 1, |
|
111 | - 398 => 1, |
|
112 | - 399 => 1, |
|
113 | - 401 => 1, |
|
114 | - 420 => 1, |
|
115 | - 422 => 1, |
|
116 | - 436 => 1, |
|
117 | - 438 => 1, |
|
118 | - 442 => 1, |
|
119 | - 443 => 1, |
|
120 | - 454 => 1, |
|
121 | - 487 => 1, |
|
122 | - 499 => 1, |
|
123 | - 500 => 1, |
|
124 | - ]; |
|
125 | - break; |
|
126 | - case 'MultipleStatementAlignmentUnitTest.js': |
|
127 | - return [ |
|
128 | - 11 => 1, |
|
129 | - 12 => 1, |
|
130 | - 23 => 1, |
|
131 | - 24 => 1, |
|
132 | - 26 => 1, |
|
133 | - 27 => 1, |
|
134 | - 37 => 1, |
|
135 | - 38 => 1, |
|
136 | - 48 => 1, |
|
137 | - 50 => 1, |
|
138 | - 51 => 1, |
|
139 | - 61 => 1, |
|
140 | - 62 => 1, |
|
141 | - 64 => 1, |
|
142 | - 65 => 1, |
|
143 | - 71 => 1, |
|
144 | - 78 => 1, |
|
145 | - 79 => 1, |
|
146 | - 81 => 1, |
|
147 | - 82 => 1, |
|
148 | - 83 => 1, |
|
149 | - 85 => 1, |
|
150 | - 86 => 1, |
|
151 | - 100 => 1, |
|
152 | - 112 => 1, |
|
153 | - 113 => 1, |
|
154 | - 114 => 1, |
|
155 | - 117 => 1, |
|
156 | - ]; |
|
157 | - break; |
|
158 | - default: |
|
159 | - return []; |
|
160 | - break; |
|
46 | + case 'MultipleStatementAlignmentUnitTest.inc': |
|
47 | + return [ |
|
48 | + 11 => 1, |
|
49 | + 12 => 1, |
|
50 | + 23 => 1, |
|
51 | + 24 => 1, |
|
52 | + 26 => 1, |
|
53 | + 27 => 1, |
|
54 | + 37 => 1, |
|
55 | + 38 => 1, |
|
56 | + 48 => 1, |
|
57 | + 50 => 1, |
|
58 | + 51 => 1, |
|
59 | + 61 => 1, |
|
60 | + 62 => 1, |
|
61 | + 64 => 1, |
|
62 | + 65 => 1, |
|
63 | + 71 => 1, |
|
64 | + 78 => 1, |
|
65 | + 79 => 1, |
|
66 | + 86 => 1, |
|
67 | + 92 => 1, |
|
68 | + 93 => 1, |
|
69 | + 94 => 1, |
|
70 | + 95 => 1, |
|
71 | + 123 => 1, |
|
72 | + 124 => 1, |
|
73 | + 126 => 1, |
|
74 | + 129 => 1, |
|
75 | + 154 => 1, |
|
76 | + 161 => 1, |
|
77 | + 178 => 1, |
|
78 | + 179 => 1, |
|
79 | + 182 => 1, |
|
80 | + 206 => 1, |
|
81 | + 207 => 1, |
|
82 | + 252 => 1, |
|
83 | + 257 => 1, |
|
84 | + 263 => 1, |
|
85 | + 269 => 1, |
|
86 | + 293 => 1, |
|
87 | + 295 => 1, |
|
88 | + 296 => 1, |
|
89 | + 297 => 1, |
|
90 | + 301 => 1, |
|
91 | + 303 => 1, |
|
92 | + 308 => 1, |
|
93 | + 311 => 1, |
|
94 | + 313 => 1, |
|
95 | + 314 => 1, |
|
96 | + 321 => 1, |
|
97 | + 322 => 1, |
|
98 | + 324 => 1, |
|
99 | + 329 => 1, |
|
100 | + 331 => 1, |
|
101 | + 336 => 1, |
|
102 | + 339 => 1, |
|
103 | + 341 => 1, |
|
104 | + 342 => 1, |
|
105 | + 349 => 1, |
|
106 | + 350 => 1, |
|
107 | + 352 => 1, |
|
108 | + 357 => 1, |
|
109 | + 364 => 1, |
|
110 | + 396 => 1, |
|
111 | + 398 => 1, |
|
112 | + 399 => 1, |
|
113 | + 401 => 1, |
|
114 | + 420 => 1, |
|
115 | + 422 => 1, |
|
116 | + 436 => 1, |
|
117 | + 438 => 1, |
|
118 | + 442 => 1, |
|
119 | + 443 => 1, |
|
120 | + 454 => 1, |
|
121 | + 487 => 1, |
|
122 | + 499 => 1, |
|
123 | + 500 => 1, |
|
124 | + ]; |
|
125 | + break; |
|
126 | + case 'MultipleStatementAlignmentUnitTest.js': |
|
127 | + return [ |
|
128 | + 11 => 1, |
|
129 | + 12 => 1, |
|
130 | + 23 => 1, |
|
131 | + 24 => 1, |
|
132 | + 26 => 1, |
|
133 | + 27 => 1, |
|
134 | + 37 => 1, |
|
135 | + 38 => 1, |
|
136 | + 48 => 1, |
|
137 | + 50 => 1, |
|
138 | + 51 => 1, |
|
139 | + 61 => 1, |
|
140 | + 62 => 1, |
|
141 | + 64 => 1, |
|
142 | + 65 => 1, |
|
143 | + 71 => 1, |
|
144 | + 78 => 1, |
|
145 | + 79 => 1, |
|
146 | + 81 => 1, |
|
147 | + 82 => 1, |
|
148 | + 83 => 1, |
|
149 | + 85 => 1, |
|
150 | + 86 => 1, |
|
151 | + 100 => 1, |
|
152 | + 112 => 1, |
|
153 | + 113 => 1, |
|
154 | + 114 => 1, |
|
155 | + 117 => 1, |
|
156 | + ]; |
|
157 | + break; |
|
158 | + default: |
|
159 | + return []; |
|
160 | + break; |
|
161 | 161 | }//end switch |
162 | 162 | |
163 | 163 | }//end getWarningList() |
@@ -16,6 +16,6 @@ |
||
16 | 16 | $code = '<'.'?php '; |
17 | 17 | |
18 | 18 | $string = 'This is a really long string. ' |
19 | - . 'It is being used for errors. ' |
|
20 | - . 'The message is not translated.'; |
|
19 | + . 'It is being used for errors. ' |
|
20 | + . 'The message is not translated.'; |
|
21 | 21 | ?> |
@@ -1,10 +1,10 @@ |
||
1 | 1 | <?php |
2 | 2 | $x = 'My '.'string'; |
3 | -$x = 'My '. 1234; |
|
3 | +$x = 'My '.1234; |
|
4 | 4 | $x = 'My '.$y.' test'; |
5 | 5 | |
6 | 6 | echo $data['my'.'index']; |
7 | -echo $data['my'. 4]; |
|
7 | +echo $data['my'.4]; |
|
8 | 8 | echo $data['my'.$x]; |
9 | 9 | echo $data[$x.$y.'My'.'String']; |
10 | 10 |
@@ -15,59 +15,59 @@ |
||
15 | 15 | { |
16 | 16 | |
17 | 17 | |
18 | - /** |
|
19 | - * Returns the lines where errors should occur. |
|
20 | - * |
|
21 | - * The key of the array should represent the line number and the value |
|
22 | - * should represent the number of errors that should occur on that line. |
|
23 | - * |
|
24 | - * @param string $testFile The name of the file being tested. |
|
25 | - * |
|
26 | - * @return array<int, int> |
|
27 | - */ |
|
28 | - public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc') |
|
29 | - { |
|
30 | - switch ($testFile) { |
|
31 | - case 'UnnecessaryStringConcatUnitTest.inc': |
|
32 | - return [ |
|
33 | - 2 => 1, |
|
34 | - 6 => 1, |
|
35 | - 9 => 1, |
|
36 | - 12 => 1, |
|
37 | - 19 => 1, |
|
38 | - 20 => 1, |
|
39 | - ]; |
|
40 | - break; |
|
41 | - case 'UnnecessaryStringConcatUnitTest.js': |
|
42 | - return [ |
|
43 | - 1 => 1, |
|
44 | - 8 => 1, |
|
45 | - 11 => 1, |
|
46 | - 14 => 1, |
|
47 | - 15 => 1, |
|
48 | - ]; |
|
49 | - break; |
|
50 | - default: |
|
51 | - return []; |
|
52 | - break; |
|
53 | - }//end switch |
|
18 | + /** |
|
19 | + * Returns the lines where errors should occur. |
|
20 | + * |
|
21 | + * The key of the array should represent the line number and the value |
|
22 | + * should represent the number of errors that should occur on that line. |
|
23 | + * |
|
24 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc') |
|
29 | + { |
|
30 | + switch ($testFile) { |
|
31 | + case 'UnnecessaryStringConcatUnitTest.inc': |
|
32 | + return [ |
|
33 | + 2 => 1, |
|
34 | + 6 => 1, |
|
35 | + 9 => 1, |
|
36 | + 12 => 1, |
|
37 | + 19 => 1, |
|
38 | + 20 => 1, |
|
39 | + ]; |
|
40 | + break; |
|
41 | + case 'UnnecessaryStringConcatUnitTest.js': |
|
42 | + return [ |
|
43 | + 1 => 1, |
|
44 | + 8 => 1, |
|
45 | + 11 => 1, |
|
46 | + 14 => 1, |
|
47 | + 15 => 1, |
|
48 | + ]; |
|
49 | + break; |
|
50 | + default: |
|
51 | + return []; |
|
52 | + break; |
|
53 | + }//end switch |
|
54 | 54 | |
55 | - }//end getErrorList() |
|
55 | + }//end getErrorList() |
|
56 | 56 | |
57 | 57 | |
58 | - /** |
|
59 | - * Returns the lines where warnings should occur. |
|
60 | - * |
|
61 | - * The key of the array should represent the line number and the value |
|
62 | - * should represent the number of warnings that should occur on that line. |
|
63 | - * |
|
64 | - * @return array<int, int> |
|
65 | - */ |
|
66 | - public function getWarningList() |
|
67 | - { |
|
68 | - return []; |
|
58 | + /** |
|
59 | + * Returns the lines where warnings should occur. |
|
60 | + * |
|
61 | + * The key of the array should represent the line number and the value |
|
62 | + * should represent the number of warnings that should occur on that line. |
|
63 | + * |
|
64 | + * @return array<int, int> |
|
65 | + */ |
|
66 | + public function getWarningList() |
|
67 | + { |
|
68 | + return []; |
|
69 | 69 | |
70 | - }//end getWarningList() |
|
70 | + }//end getWarningList() |
|
71 | 71 | |
72 | 72 | |
73 | 73 | }//end class |
@@ -28,28 +28,28 @@ |
||
28 | 28 | public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc') |
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | - case 'UnnecessaryStringConcatUnitTest.inc': |
|
32 | - return [ |
|
33 | - 2 => 1, |
|
34 | - 6 => 1, |
|
35 | - 9 => 1, |
|
36 | - 12 => 1, |
|
37 | - 19 => 1, |
|
38 | - 20 => 1, |
|
39 | - ]; |
|
40 | - break; |
|
41 | - case 'UnnecessaryStringConcatUnitTest.js': |
|
42 | - return [ |
|
43 | - 1 => 1, |
|
44 | - 8 => 1, |
|
45 | - 11 => 1, |
|
46 | - 14 => 1, |
|
47 | - 15 => 1, |
|
48 | - ]; |
|
49 | - break; |
|
50 | - default: |
|
51 | - return []; |
|
52 | - break; |
|
31 | + case 'UnnecessaryStringConcatUnitTest.inc': |
|
32 | + return [ |
|
33 | + 2 => 1, |
|
34 | + 6 => 1, |
|
35 | + 9 => 1, |
|
36 | + 12 => 1, |
|
37 | + 19 => 1, |
|
38 | + 20 => 1, |
|
39 | + ]; |
|
40 | + break; |
|
41 | + case 'UnnecessaryStringConcatUnitTest.js': |
|
42 | + return [ |
|
43 | + 1 => 1, |
|
44 | + 8 => 1, |
|
45 | + 11 => 1, |
|
46 | + 14 => 1, |
|
47 | + 15 => 1, |
|
48 | + ]; |
|
49 | + break; |
|
50 | + default: |
|
51 | + return []; |
|
52 | + break; |
|
53 | 53 | }//end switch |
54 | 54 | |
55 | 55 | }//end getErrorList() |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='UnnecessaryStringConcatUnitTest.inc') |
|
28 | + public function getErrorList($testFile = 'UnnecessaryStringConcatUnitTest.inc') |
|
29 | 29 | { |
30 | 30 | switch ($testFile) { |
31 | 31 | case 'UnnecessaryStringConcatUnitTest.inc': |