@@ -25,13 +25,13 @@ discard block |
||
25 | 25 | public static function addIssue( |
26 | 26 | $title, |
27 | 27 | $description, |
28 | - $reporter=NULL, |
|
29 | - $projectid=NULL, |
|
30 | - array $tags=array(), |
|
31 | - $status=NULL, |
|
32 | - $assignedTo=NULL, |
|
33 | - $reportedDate=NULL, |
|
34 | - $reportedMilestone=NULL |
|
28 | + $reporter = NULL, |
|
29 | + $projectid = NULL, |
|
30 | + array $tags = array(), |
|
31 | + $status = NULL, |
|
32 | + $assignedTo = NULL, |
|
33 | + $reportedDate = NULL, |
|
34 | + $reportedMilestone = NULL |
|
35 | 35 | ) { |
36 | 36 | // Get current projectid if not specified. |
37 | 37 | if ($projectid === NULL) { |
@@ -160,13 +160,13 @@ discard block |
||
160 | 160 | public static function addIssue( |
161 | 161 | $title, |
162 | 162 | $description, |
163 | - $reporter=NULL, |
|
164 | - $projectid=NULL, |
|
165 | - array $tags=array(), |
|
166 | - $status=NULL, |
|
167 | - $assignedTo=NULL, |
|
168 | - $reportedDate=NULL, |
|
169 | - $reportedMilestone=NULL |
|
163 | + $reporter = NULL, |
|
164 | + $projectid = NULL, |
|
165 | + array $tags = array(), |
|
166 | + $status = NULL, |
|
167 | + $assignedTo = NULL, |
|
168 | + $reportedDate = NULL, |
|
169 | + $reportedMilestone = NULL |
|
170 | 170 | ) { |
171 | 171 | // Get current projectid if not specified. |
172 | 172 | if ($projectid === NULL) { |
@@ -27,116 +27,116 @@ discard block |
||
27 | 27 | * @api-permission public |
28 | 28 | */ |
29 | 29 | public static function addIssue( |
30 | - $title, |
|
31 | - $description, |
|
32 | - $reporter=NULL, |
|
33 | - $projectid=NULL, |
|
34 | - array $tags=array(), |
|
35 | - $status=NULL, |
|
36 | - $assignedTo=NULL, |
|
37 | - $reportedDate=NULL, |
|
38 | - $reportedMilestone=NULL |
|
30 | + $title, |
|
31 | + $description, |
|
32 | + $reporter=NULL, |
|
33 | + $projectid=NULL, |
|
34 | + array $tags=array(), |
|
35 | + $status=NULL, |
|
36 | + $assignedTo=NULL, |
|
37 | + $reportedDate=NULL, |
|
38 | + $reportedMilestone=NULL |
|
39 | 39 | ) { |
40 | - // Get current projectid if not specified. |
|
41 | - if ($projectid === NULL) { |
|
42 | - Channels::includeSystem('Project'); |
|
43 | - $projectid = Project::getCurrentProjectId(); |
|
44 | - Channels::modifyBasket('project', $projectid); |
|
45 | - } |
|
46 | - |
|
47 | - Channels::includeSystem('SquizRoadmap'); |
|
48 | - Channels::includeSystem('Permission'); |
|
49 | - if (Permission::hasPermission($projectid, 'ideas.contribute') === FALSE) { |
|
50 | - throw new ChannelException(_('You do not have permission to contribute idea')); |
|
51 | - } |
|
52 | - |
|
53 | - if ($assignedTo !== NULL) { |
|
54 | - if (Permission::hasPermission($projectid, 'ideas.edit.details') === FALSE) { |
|
55 | - throw new ChannelException(_('You do not have permission to assign user to idea')); |
|
56 | - } |
|
57 | - |
|
58 | - if (SquizRoadmap::isVisibleProject($projectid, $assignedTo) === FALSE) { |
|
59 | - throw new ChannelException(_('Assigned to user does not have access to issue project.')); |
|
60 | - } |
|
61 | - } |
|
62 | - |
|
63 | - // Get current user id if not specified. |
|
64 | - if ($reporter === NULL) { |
|
65 | - Channels::includeSystem('User'); |
|
66 | - $reporter = User::getCurrentUserid(); |
|
67 | - Channels::modifyBasket('reporter', $reporter); |
|
68 | - } |
|
69 | - |
|
70 | - if (SquizRoadmap::isVisibleProject($projectid, $reporter) === FALSE) { |
|
71 | - throw new ChannelException(_('Contributed by user does not have access to issue project.')); |
|
72 | - } |
|
73 | - |
|
74 | - // Make sure status is valid. |
|
75 | - Channels::includeSystem('SquizRoadmap'); |
|
76 | - Channels::includeSystem('SquizRoadmapStatus'); |
|
77 | - if ($status === NULL) { |
|
78 | - $statuses = SquizRoadmapStatus::getStatus($projectid); |
|
79 | - if (empty($statuses) === TRUE) { |
|
80 | - throw new ChannelException(_('No defined statuses in project')); |
|
81 | - } |
|
82 | - |
|
83 | - $status = $statuses[0]['status']; |
|
84 | - Channels::modifyBasket('status', $status); |
|
85 | - } else if (SquizRoadmapStatus::isValidStatus($projectid, $status) === FALSE) { |
|
86 | - throw new ChannelException(sprintf(_('Invalid status: %s'), $status)); |
|
87 | - } |
|
88 | - |
|
89 | - $issueid = DAL::seqNextVal('sq_rdm_issue_seq'); |
|
90 | - Channels::addToBasket('issueid', $issueid); |
|
91 | - |
|
92 | - if ($reportedDate === NULL) { |
|
93 | - include_once 'Libs/String/String.inc'; |
|
94 | - $reportedDate = String::tsIso8601(time()); |
|
95 | - Channels::modifyBasket('reportedDate', $reportedDate); |
|
96 | - } |
|
97 | - |
|
98 | - $title = trim($title); |
|
99 | - Channels::modifyBasket('title', $title); |
|
100 | - if (empty($title) === TRUE) { |
|
101 | - throw new ChannelException(_('Title cannot be empty')); |
|
102 | - } |
|
103 | - |
|
104 | - $description = SquizRoadmap::stripTags(trim($description)); |
|
105 | - Channels::modifyBasket('description', $description); |
|
106 | - if (empty($description) === TRUE) { |
|
107 | - throw new ChannelException(_('Description cannot be empty')); |
|
108 | - } |
|
109 | - |
|
110 | - try { |
|
111 | - DAL::beginTransaction(); |
|
112 | - |
|
113 | - $query = DAL::getDALQuery('SquizRoadmapIssue', 'addIssue'); |
|
114 | - DAL::executeQuery($query); |
|
115 | - |
|
116 | - // Add tags for the new issue. |
|
117 | - SquizRoadmapIssue::addIssueTags($issueid, $tags); |
|
118 | - |
|
119 | - // Add reporter and assignee to watch list. |
|
120 | - SquizRoadmapIssue::addIssueWatch($issueid, $reporter); |
|
121 | - |
|
122 | - if ($assignedTo !== NULL) { |
|
123 | - SquizRoadmapIssue::addIssueWatch($issueid, $assignedTo); |
|
124 | - } |
|
125 | - |
|
126 | - SquizRoadmapIssue::clearIssueCache($issueid); |
|
127 | - |
|
128 | - DAL::commit(); |
|
129 | - } catch (Exception $e) { |
|
130 | - DAL::rollBack(); |
|
131 | - throw new ChannelException($e->getMessage()); |
|
132 | - }//end try |
|
133 | - |
|
134 | - if ($something === NULL) { |
|
135 | - if ($bar !== NULL) { |
|
136 | - } |
|
137 | - } |
|
138 | - |
|
139 | - return $issueid; |
|
40 | + // Get current projectid if not specified. |
|
41 | + if ($projectid === NULL) { |
|
42 | + Channels::includeSystem('Project'); |
|
43 | + $projectid = Project::getCurrentProjectId(); |
|
44 | + Channels::modifyBasket('project', $projectid); |
|
45 | + } |
|
46 | + |
|
47 | + Channels::includeSystem('SquizRoadmap'); |
|
48 | + Channels::includeSystem('Permission'); |
|
49 | + if (Permission::hasPermission($projectid, 'ideas.contribute') === FALSE) { |
|
50 | + throw new ChannelException(_('You do not have permission to contribute idea')); |
|
51 | + } |
|
52 | + |
|
53 | + if ($assignedTo !== NULL) { |
|
54 | + if (Permission::hasPermission($projectid, 'ideas.edit.details') === FALSE) { |
|
55 | + throw new ChannelException(_('You do not have permission to assign user to idea')); |
|
56 | + } |
|
57 | + |
|
58 | + if (SquizRoadmap::isVisibleProject($projectid, $assignedTo) === FALSE) { |
|
59 | + throw new ChannelException(_('Assigned to user does not have access to issue project.')); |
|
60 | + } |
|
61 | + } |
|
62 | + |
|
63 | + // Get current user id if not specified. |
|
64 | + if ($reporter === NULL) { |
|
65 | + Channels::includeSystem('User'); |
|
66 | + $reporter = User::getCurrentUserid(); |
|
67 | + Channels::modifyBasket('reporter', $reporter); |
|
68 | + } |
|
69 | + |
|
70 | + if (SquizRoadmap::isVisibleProject($projectid, $reporter) === FALSE) { |
|
71 | + throw new ChannelException(_('Contributed by user does not have access to issue project.')); |
|
72 | + } |
|
73 | + |
|
74 | + // Make sure status is valid. |
|
75 | + Channels::includeSystem('SquizRoadmap'); |
|
76 | + Channels::includeSystem('SquizRoadmapStatus'); |
|
77 | + if ($status === NULL) { |
|
78 | + $statuses = SquizRoadmapStatus::getStatus($projectid); |
|
79 | + if (empty($statuses) === TRUE) { |
|
80 | + throw new ChannelException(_('No defined statuses in project')); |
|
81 | + } |
|
82 | + |
|
83 | + $status = $statuses[0]['status']; |
|
84 | + Channels::modifyBasket('status', $status); |
|
85 | + } else if (SquizRoadmapStatus::isValidStatus($projectid, $status) === FALSE) { |
|
86 | + throw new ChannelException(sprintf(_('Invalid status: %s'), $status)); |
|
87 | + } |
|
88 | + |
|
89 | + $issueid = DAL::seqNextVal('sq_rdm_issue_seq'); |
|
90 | + Channels::addToBasket('issueid', $issueid); |
|
91 | + |
|
92 | + if ($reportedDate === NULL) { |
|
93 | + include_once 'Libs/String/String.inc'; |
|
94 | + $reportedDate = String::tsIso8601(time()); |
|
95 | + Channels::modifyBasket('reportedDate', $reportedDate); |
|
96 | + } |
|
97 | + |
|
98 | + $title = trim($title); |
|
99 | + Channels::modifyBasket('title', $title); |
|
100 | + if (empty($title) === TRUE) { |
|
101 | + throw new ChannelException(_('Title cannot be empty')); |
|
102 | + } |
|
103 | + |
|
104 | + $description = SquizRoadmap::stripTags(trim($description)); |
|
105 | + Channels::modifyBasket('description', $description); |
|
106 | + if (empty($description) === TRUE) { |
|
107 | + throw new ChannelException(_('Description cannot be empty')); |
|
108 | + } |
|
109 | + |
|
110 | + try { |
|
111 | + DAL::beginTransaction(); |
|
112 | + |
|
113 | + $query = DAL::getDALQuery('SquizRoadmapIssue', 'addIssue'); |
|
114 | + DAL::executeQuery($query); |
|
115 | + |
|
116 | + // Add tags for the new issue. |
|
117 | + SquizRoadmapIssue::addIssueTags($issueid, $tags); |
|
118 | + |
|
119 | + // Add reporter and assignee to watch list. |
|
120 | + SquizRoadmapIssue::addIssueWatch($issueid, $reporter); |
|
121 | + |
|
122 | + if ($assignedTo !== NULL) { |
|
123 | + SquizRoadmapIssue::addIssueWatch($issueid, $assignedTo); |
|
124 | + } |
|
125 | + |
|
126 | + SquizRoadmapIssue::clearIssueCache($issueid); |
|
127 | + |
|
128 | + DAL::commit(); |
|
129 | + } catch (Exception $e) { |
|
130 | + DAL::rollBack(); |
|
131 | + throw new ChannelException($e->getMessage()); |
|
132 | + }//end try |
|
133 | + |
|
134 | + if ($something === NULL) { |
|
135 | + if ($bar !== NULL) { |
|
136 | + } |
|
137 | + } |
|
138 | + |
|
139 | + return $issueid; |
|
140 | 140 | |
141 | 141 | }//end addIssue() |
142 | 142 | |
@@ -162,21 +162,21 @@ discard block |
||
162 | 162 | * |
163 | 163 | */ |
164 | 164 | public static function addIssue( |
165 | - $title, |
|
166 | - $description, |
|
167 | - $reporter=NULL, |
|
168 | - $projectid=NULL, |
|
169 | - array $tags=array(), |
|
170 | - $status=NULL, |
|
171 | - $assignedTo=NULL, |
|
172 | - $reportedDate=NULL, |
|
173 | - $reportedMilestone=NULL |
|
165 | + $title, |
|
166 | + $description, |
|
167 | + $reporter=NULL, |
|
168 | + $projectid=NULL, |
|
169 | + array $tags=array(), |
|
170 | + $status=NULL, |
|
171 | + $assignedTo=NULL, |
|
172 | + $reportedDate=NULL, |
|
173 | + $reportedMilestone=NULL |
|
174 | 174 | ) { |
175 | - // Get current projectid if not specified. |
|
176 | - if ($projectid === NULL) { |
|
177 | - Channels::includeSystem('Project'); |
|
178 | - $projectid = Project::getCurrentProjectId(); |
|
179 | - Channels::modifyBasket('project', $projectid); |
|
180 | - } |
|
175 | + // Get current projectid if not specified. |
|
176 | + if ($projectid === NULL) { |
|
177 | + Channels::includeSystem('Project'); |
|
178 | + $projectid = Project::getCurrentProjectId(); |
|
179 | + Channels::modifyBasket('project', $projectid); |
|
180 | + } |
|
181 | 181 | |
182 | 182 | }//end addIssue() |
@@ -15,38 +15,38 @@ |
||
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 | - |
|
30 | - }//end getErrorList() |
|
31 | - |
|
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 | - * @return array<int, int> |
|
40 | - */ |
|
41 | - public function getWarningList() |
|
42 | - { |
|
43 | - return [ |
|
44 | - 4 => 1, |
|
45 | - 12 => 1, |
|
46 | - 21 => 1, |
|
47 | - ]; |
|
48 | - |
|
49 | - }//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 | + |
|
30 | + }//end getErrorList() |
|
31 | + |
|
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 | + * @return array<int, int> |
|
40 | + */ |
|
41 | + public function getWarningList() |
|
42 | + { |
|
43 | + return [ |
|
44 | + 4 => 1, |
|
45 | + 12 => 1, |
|
46 | + 21 => 1, |
|
47 | + ]; |
|
48 | + |
|
49 | + }//end getWarningList() |
|
50 | 50 | |
51 | 51 | |
52 | 52 | }//end class |
@@ -1,25 +1,25 @@ |
||
1 | 1 | <?php |
2 | 2 | function getWidget($type) |
3 | 3 | { |
4 | - eval('$obj = new '.$type.'();'); |
|
5 | - return $obj; |
|
4 | + eval('$obj = new '.$type.'();'); |
|
5 | + return $obj; |
|
6 | 6 | |
7 | 7 | }//end getWidget() |
8 | 8 | |
9 | 9 | function getWidget2($type) |
10 | 10 | { |
11 | - $string = '$obj = new '.$type.'();'; |
|
12 | - eval($string); |
|
13 | - eval('$string = "";'); |
|
14 | - return $obj; |
|
11 | + $string = '$obj = new '.$type.'();'; |
|
12 | + eval($string); |
|
13 | + eval('$string = "";'); |
|
14 | + return $obj; |
|
15 | 15 | |
16 | 16 | }//end getWidget2() |
17 | 17 | |
18 | 18 | function getWidget3($type) |
19 | 19 | { |
20 | - $string = '$obj = new '; |
|
21 | - eval($string.$type.'();'); |
|
22 | - return $obj; |
|
20 | + $string = '$obj = new '; |
|
21 | + eval($string.$type.'();'); |
|
22 | + return $obj; |
|
23 | 23 | |
24 | 24 | }//end getWidget3() |
25 | 25 |
@@ -15,42 +15,42 @@ |
||
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 | - 2 => 1, |
|
30 | - 5 => 1, |
|
31 | - 8 => 1, |
|
32 | - 21 => 1, |
|
33 | - 26 => 1, |
|
34 | - 27 => 1, |
|
35 | - 28 => 1, |
|
36 | - ]; |
|
37 | - |
|
38 | - }//end getErrorList() |
|
39 | - |
|
40 | - |
|
41 | - /** |
|
42 | - * Returns the lines where warnings should occur. |
|
43 | - * |
|
44 | - * The key of the array should represent the line number and the value |
|
45 | - * should represent the number of warnings that should occur on that line. |
|
46 | - * |
|
47 | - * @return array<int, int> |
|
48 | - */ |
|
49 | - public function getWarningList() |
|
50 | - { |
|
51 | - return []; |
|
52 | - |
|
53 | - }//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 | + 2 => 1, |
|
30 | + 5 => 1, |
|
31 | + 8 => 1, |
|
32 | + 21 => 1, |
|
33 | + 26 => 1, |
|
34 | + 27 => 1, |
|
35 | + 28 => 1, |
|
36 | + ]; |
|
37 | + |
|
38 | + }//end getErrorList() |
|
39 | + |
|
40 | + |
|
41 | + /** |
|
42 | + * Returns the lines where warnings should occur. |
|
43 | + * |
|
44 | + * The key of the array should represent the line number and the value |
|
45 | + * should represent the number of warnings that should occur on that line. |
|
46 | + * |
|
47 | + * @return array<int, int> |
|
48 | + */ |
|
49 | + public function getWarningList() |
|
50 | + { |
|
51 | + return []; |
|
52 | + |
|
53 | + }//end getWarningList() |
|
54 | 54 | |
55 | 55 | |
56 | 56 | }//end class |
@@ -10,17 +10,17 @@ |
||
10 | 10 | |
11 | 11 | class Security |
12 | 12 | { |
13 | - function getRequestData($var) { |
|
14 | - echo $_REQUEST[$var]; |
|
15 | - } |
|
13 | + function getRequestData($var) { |
|
14 | + echo $_REQUEST[$var]; |
|
15 | + } |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | class Insecurity |
19 | 19 | { |
20 | - function getRequestData($var) { |
|
21 | - unset($_REQUEST[$var]); |
|
22 | - echo 'OMGHAX!'; |
|
23 | - } |
|
20 | + function getRequestData($var) { |
|
21 | + unset($_REQUEST[$var]); |
|
22 | + echo 'OMGHAX!'; |
|
23 | + } |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | $sample = Util::getArrayIndex($_REQUEST, 'sample', ''); |
@@ -15,48 +15,48 @@ |
||
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='JoinStringsUnitTest.js') |
|
29 | - { |
|
30 | - if ($testFile !== 'JoinStringsUnitTest.js') { |
|
31 | - return []; |
|
32 | - } |
|
33 | - |
|
34 | - return [ |
|
35 | - 6 => 1, |
|
36 | - 7 => 1, |
|
37 | - 8 => 2, |
|
38 | - 9 => 2, |
|
39 | - 10 => 2, |
|
40 | - 12 => 2, |
|
41 | - 15 => 1, |
|
42 | - ]; |
|
43 | - |
|
44 | - }//end getErrorList() |
|
45 | - |
|
46 | - |
|
47 | - /** |
|
48 | - * Returns the lines where warnings should occur. |
|
49 | - * |
|
50 | - * The key of the array should represent the line number and the value |
|
51 | - * should represent the number of warnings that should occur on that line. |
|
52 | - * |
|
53 | - * @return array<int, int> |
|
54 | - */ |
|
55 | - public function getWarningList() |
|
56 | - { |
|
57 | - return []; |
|
58 | - |
|
59 | - }//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 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='JoinStringsUnitTest.js') |
|
29 | + { |
|
30 | + if ($testFile !== 'JoinStringsUnitTest.js') { |
|
31 | + return []; |
|
32 | + } |
|
33 | + |
|
34 | + return [ |
|
35 | + 6 => 1, |
|
36 | + 7 => 1, |
|
37 | + 8 => 2, |
|
38 | + 9 => 2, |
|
39 | + 10 => 2, |
|
40 | + 12 => 2, |
|
41 | + 15 => 1, |
|
42 | + ]; |
|
43 | + |
|
44 | + }//end getErrorList() |
|
45 | + |
|
46 | + |
|
47 | + /** |
|
48 | + * Returns the lines where warnings should occur. |
|
49 | + * |
|
50 | + * The key of the array should represent the line number and the value |
|
51 | + * should represent the number of warnings that should occur on that line. |
|
52 | + * |
|
53 | + * @return array<int, int> |
|
54 | + */ |
|
55 | + public function getWarningList() |
|
56 | + { |
|
57 | + return []; |
|
58 | + |
|
59 | + }//end getWarningList() |
|
60 | 60 | |
61 | 61 | |
62 | 62 | }//end class |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='JoinStringsUnitTest.js') |
|
28 | + public function getErrorList($testFile = 'JoinStringsUnitTest.js') |
|
29 | 29 | { |
30 | 30 | if ($testFile !== 'JoinStringsUnitTest.js') { |
31 | 31 | return []; |
@@ -15,47 +15,47 @@ |
||
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='FirebugConsoleUnitTest.js') |
|
29 | - { |
|
30 | - if ($testFile !== 'FirebugConsoleUnitTest.js') { |
|
31 | - return []; |
|
32 | - } |
|
33 | - |
|
34 | - return [ |
|
35 | - 1 => 1, |
|
36 | - 2 => 1, |
|
37 | - 3 => 1, |
|
38 | - 5 => 1, |
|
39 | - 6 => 1, |
|
40 | - 8 => 1, |
|
41 | - ]; |
|
42 | - |
|
43 | - }//end getErrorList() |
|
44 | - |
|
45 | - |
|
46 | - /** |
|
47 | - * Returns the lines where warnings should occur. |
|
48 | - * |
|
49 | - * The key of the array should represent the line number and the value |
|
50 | - * should represent the number of warnings that should occur on that line. |
|
51 | - * |
|
52 | - * @return array<int, int> |
|
53 | - */ |
|
54 | - public function getWarningList() |
|
55 | - { |
|
56 | - return []; |
|
57 | - |
|
58 | - }//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 | + * @param string $testFile The name of the file being tested. |
|
25 | + * |
|
26 | + * @return array<int, int> |
|
27 | + */ |
|
28 | + public function getErrorList($testFile='FirebugConsoleUnitTest.js') |
|
29 | + { |
|
30 | + if ($testFile !== 'FirebugConsoleUnitTest.js') { |
|
31 | + return []; |
|
32 | + } |
|
33 | + |
|
34 | + return [ |
|
35 | + 1 => 1, |
|
36 | + 2 => 1, |
|
37 | + 3 => 1, |
|
38 | + 5 => 1, |
|
39 | + 6 => 1, |
|
40 | + 8 => 1, |
|
41 | + ]; |
|
42 | + |
|
43 | + }//end getErrorList() |
|
44 | + |
|
45 | + |
|
46 | + /** |
|
47 | + * Returns the lines where warnings should occur. |
|
48 | + * |
|
49 | + * The key of the array should represent the line number and the value |
|
50 | + * should represent the number of warnings that should occur on that line. |
|
51 | + * |
|
52 | + * @return array<int, int> |
|
53 | + */ |
|
54 | + public function getWarningList() |
|
55 | + { |
|
56 | + return []; |
|
57 | + |
|
58 | + }//end getWarningList() |
|
59 | 59 | |
60 | 60 | |
61 | 61 | }//end class |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * |
26 | 26 | * @return array<int, int> |
27 | 27 | */ |
28 | - public function getErrorList($testFile='FirebugConsoleUnitTest.js') |
|
28 | + public function getErrorList($testFile = 'FirebugConsoleUnitTest.js') |
|
29 | 29 | { |
30 | 30 | if ($testFile !== 'FirebugConsoleUnitTest.js') { |
31 | 31 | return []; |
@@ -15,37 +15,37 @@ |
||
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 | - 2 => 1, |
|
30 | - 3 => 1, |
|
31 | - ]; |
|
32 | - |
|
33 | - }//end getErrorList() |
|
34 | - |
|
35 | - |
|
36 | - /** |
|
37 | - * Returns the lines where warnings should occur. |
|
38 | - * |
|
39 | - * The key of the array should represent the line number and the value |
|
40 | - * should represent the number of warnings that should occur on that line. |
|
41 | - * |
|
42 | - * @return array<int, int> |
|
43 | - */ |
|
44 | - public function getWarningList() |
|
45 | - { |
|
46 | - return []; |
|
47 | - |
|
48 | - }//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 | + 2 => 1, |
|
30 | + 3 => 1, |
|
31 | + ]; |
|
32 | + |
|
33 | + }//end getErrorList() |
|
34 | + |
|
35 | + |
|
36 | + /** |
|
37 | + * Returns the lines where warnings should occur. |
|
38 | + * |
|
39 | + * The key of the array should represent the line number and the value |
|
40 | + * should represent the number of warnings that should occur on that line. |
|
41 | + * |
|
42 | + * @return array<int, int> |
|
43 | + */ |
|
44 | + public function getWarningList() |
|
45 | + { |
|
46 | + return []; |
|
47 | + |
|
48 | + }//end getWarningList() |
|
49 | 49 | |
50 | 50 | |
51 | 51 | }//end class |
@@ -2,50 +2,50 @@ |
||
2 | 2 | class SomethingActions |
3 | 3 | { |
4 | 4 | |
5 | - private static function _x() |
|
6 | - { |
|
7 | - } |
|
8 | - |
|
9 | - |
|
10 | - public static function y() |
|
11 | - { |
|
12 | - self::z(); |
|
13 | - static::z(); |
|
14 | - SomethingActions::z(); |
|
15 | - static::_x(); |
|
16 | - self::a(); |
|
17 | - static::a(); |
|
18 | - } |
|
19 | - |
|
20 | - |
|
21 | - public static function z() |
|
22 | - { |
|
23 | - } |
|
24 | - |
|
25 | - protected static function a() |
|
26 | - { |
|
27 | - self::a(); // recursion, yay! |
|
28 | - self::z(); |
|
29 | - static::y(); |
|
30 | - self::b(); |
|
31 | - echo self::$_myVar; |
|
32 | - echo static::$yourVar; |
|
33 | - } |
|
5 | + private static function _x() |
|
6 | + { |
|
7 | + } |
|
8 | + |
|
9 | + |
|
10 | + public static function y() |
|
11 | + { |
|
12 | + self::z(); |
|
13 | + static::z(); |
|
14 | + SomethingActions::z(); |
|
15 | + static::_x(); |
|
16 | + self::a(); |
|
17 | + static::a(); |
|
18 | + } |
|
19 | + |
|
20 | + |
|
21 | + public static function z() |
|
22 | + { |
|
23 | + } |
|
24 | + |
|
25 | + protected static function a() |
|
26 | + { |
|
27 | + self::a(); // recursion, yay! |
|
28 | + self::z(); |
|
29 | + static::y(); |
|
30 | + self::b(); |
|
31 | + echo self::$_myVar; |
|
32 | + echo static::$yourVar; |
|
33 | + } |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | abstract class AbstractEditingScreenModeWidgetActions extends AbstractEditingModeWidgetActions { |
37 | 37 | |
38 | - public static function getScreens($systemName) |
|
39 | - { |
|
38 | + public static function getScreens($systemName) |
|
39 | + { |
|
40 | 40 | |
41 | - }//end getScreens() |
|
41 | + }//end getScreens() |
|
42 | 42 | |
43 | - public static function setHelpScreenTitle() |
|
44 | - { |
|
45 | - // This is allowed because we are in an abstract class. |
|
46 | - $screens = self::getScreens(''); |
|
43 | + public static function setHelpScreenTitle() |
|
44 | + { |
|
45 | + // This is allowed because we are in an abstract class. |
|
46 | + $screens = self::getScreens(''); |
|
47 | 47 | |
48 | - }//end setHelpScreenTitle() |
|
48 | + }//end setHelpScreenTitle() |
|
49 | 49 | |
50 | 50 | }//end class |
51 | 51 | ?> |