Skip to content

Commit

Permalink
Squiz/FunctionDeclarationArgumentSpacing: rename test case file
Browse files Browse the repository at this point in the history
... to allow for adding additional test case files.
  • Loading branch information
jrfnl committed Jan 23, 2025
1 parent 0e0e0fb commit 7463c78
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,65 +26,73 @@ final class FunctionDeclarationArgumentSpacingUnitTest extends AbstractSniffUnit
* The key of the array should represent the line number and the value
* should represent the number of errors that should occur on that line.
*
* @param string $testFile The name of the file being tested.
*
* @return array<int, int>
*/
public function getErrorList()
public function getErrorList($testFile='')
{
return [
3 => 1,
5 => 2,
7 => 2,
8 => 2,
9 => 2,
11 => 2,
13 => 7,
14 => 2,
15 => 2,
16 => 4,
18 => 2,
35 => 2,
36 => 2,
44 => 2,
45 => 1,
46 => 1,
51 => 2,
53 => 2,
55 => 1,
56 => 1,
58 => 1,
73 => 7,
76 => 1,
77 => 1,
81 => 1,
89 => 2,
92 => 1,
93 => 1,
94 => 1,
95 => 1,
99 => 11,
100 => 2,
101 => 2,
102 => 2,
106 => 1,
107 => 2,
111 => 3,
113 => 1,
117 => 1,
123 => 1,
129 => 1,
135 => 1,
141 => 1,
149 => 2,
155 => 2,
163 => 2,
174 => 2,
182 => 1,
185 => 1,
191 => 1,
193 => 1,
195 => 1,
196 => 1,
];
switch ($testFile) {
case 'FunctionDeclarationArgumentSpacingUnitTest.1.inc':
return [
3 => 1,
5 => 2,
7 => 2,
8 => 2,
9 => 2,
11 => 2,
13 => 7,
14 => 2,
15 => 2,
16 => 4,
18 => 2,
35 => 2,
36 => 2,
44 => 2,
45 => 1,
46 => 1,
51 => 2,
53 => 2,
55 => 1,
56 => 1,
58 => 1,
73 => 7,
76 => 1,
77 => 1,
81 => 1,
89 => 2,
92 => 1,
93 => 1,
94 => 1,
95 => 1,
99 => 11,
100 => 2,
101 => 2,
102 => 2,
106 => 1,
107 => 2,
111 => 3,
113 => 1,
117 => 1,
123 => 1,
129 => 1,
135 => 1,
141 => 1,
149 => 2,
155 => 2,
163 => 2,
174 => 2,
182 => 1,
185 => 1,
191 => 1,
193 => 1,
195 => 1,
196 => 1,
];

default:
return [];
}//end switch

}//end getErrorList()

Expand Down

0 comments on commit 7463c78

Please sign in to comment.