Skip to content

Commit 9176331

Browse files
committed
Cleaned up code - some files were refactored with refactor
The following adjustments were made: - Long array to short array (LongArrayToShortArrayRector) - Changes negate of empty comparison of nullable value to explicit === or !== compare (NullableCompareToNullRector) - Change if with isset and return to coalesce (IfIssetToCoalescingRector) - Change list() to array destruct (ListToArrayDestructRector) - Add explicit public method visibility (ExplicitPublicClassMethodRector) - Change property modifier from var to public (VarToPublicPropertyRector) - Wrap encapsed variables in curly braces (WrapEncapsedVariableInCurlyBracesRector) - Privatize getter of local property to property (PrivatizeLocalGetterToPropertyRector) - Change count array comparison to empty array comparison to improve performance (CountArrayToEmptyArrayComparisonRector) - Makes array_search search for identical elements (StrictArraySearchRector)
1 parent a2d7031 commit 9176331

443 files changed

Lines changed: 11324 additions & 11323 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

cfg/const.inc.php

Lines changed: 121 additions & 121 deletions
Large diffs are not rendered by default.

cfg/oauth_samples/oauth.azuread.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// require('aouth.azuread.inc.php');
2828
//
2929
// -------------------------------------------------------------
30-
$tlCfg->OAuthServers['azuread'] = array();
30+
$tlCfg->OAuthServers['azuread'] = [];
3131

3232
$tlCfg->OAuthServers['azuread']['redirect_uri'] = (empty($_SERVER['HTTPS']) ? 'http://' : 'https://') .
3333
$_SERVER['HTTP_HOST'] . '/login.php';

cfg/oauth_samples/oauth.github.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
# This is only a working example that is useful
3434
# for the TestLink Development Team
3535
#
36-
$tlCfg->OAuthServers['github'] = array();
36+
$tlCfg->OAuthServers['github'] = [];
3737
$tlCfg->OAuthServers['github']['redirect_uri'] = 'http://fman.hopto.org/login.php?oauth=github';
3838

3939
$tlCfg->OAuthServers['github']['oauth_client_id'] = 'aa5f70a8de342fb95043';

cfg/oauth_samples/oauth.gitlab.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
# This is only a working example that is useful
3333
# for the TestLink Development Team
3434
#
35-
$tlCfg->OAuthServers['gitlab'] = array();
35+
$tlCfg->OAuthServers['gitlab'] = [];
3636

3737
$tlCfg->OAuthServers['gitlab']['redirect_uri'] = 'http://fman.hopto.org/login.php?oauth=gitlab';
3838

cfg/oauth_samples/oauth.google.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
# This is only a working example that is useful
2727
# for the TestLink Development Team
2828
#
29-
$tlCfg->OAuthServers['google'] = array();
29+
$tlCfg->OAuthServers['google'] = [];
3030
$tlCfg->OAuthServers['google']['redirect_uri'] = 'http://fman.hopto.org/login.php?oauth=google';
3131

3232
$tlCfg->OAuthServers['google']['oauth_enabled'] = true;

cfg/oauth_samples/oauth.microsoft.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
// require('aouth.microsoft.inc.php');
1818
//
1919
// -------------------------------------------------------------
20-
$tlCfg->OAuthServers['microsoft'] = array();
20+
$tlCfg->OAuthServers['microsoft'] = [];
2121
$tlCfg->OAuthServers['microsoft']['redirect_uri'] = '';
2222

2323
$tlCfg->OAuthServers['microsoft']['oauth_enabled'] = true;

cfg/reports.cfg.php

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -32,29 +32,29 @@
3232
/**
3333
* supported document formats (value = localization ID)
3434
*/
35-
$tlCfg->reports_formats = array(
35+
$tlCfg->reports_formats = [
3636
FORMAT_HTML => 'format_html',
3737
FORMAT_MSWORD => 'format_pseudo_msword',
3838
FORMAT_MAIL_HTML => 'format_mail_html'
39-
);
39+
];
4040

4141
/**
4242
* Mime Content Type
4343
*/
44-
$tlCfg->reports_applications = array(
44+
$tlCfg->reports_applications = [
4545
FORMAT_HTML => 'text/html',
4646
FORMAT_XLS => 'application/vnd.ms-excel',
4747
FORMAT_MSWORD => 'application/vnd.ms-word'
48-
);
48+
];
4949

5050
/**
5151
* Report file extenssion
5252
*/
53-
$tlCfg->reports_file_extension = array(
53+
$tlCfg->reports_file_extension = [
5454
FORMAT_HTML => 'html',
5555
FORMAT_XLS => 'xls',
5656
FORMAT_MSWORD => 'doc'
57-
);
57+
];
5858

5959
/**
6060
*
@@ -66,69 +66,69 @@
6666
* 2. bts (if bug tracker is connected only),
6767
* 3. req (if project has available requirements only)
6868
*/
69-
$tlCfg->reports_list['test_plan'] = array(
69+
$tlCfg->reports_list['test_plan'] = [
7070
'title' => 'link_report_test_plan',
7171
'url' => 'lib/results/printDocOptions.php?type=' . DOC_TEST_PLAN_DESIGN,
7272
'enabled' => 'all',
7373
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=test_plan',
7474
'format' => 'format_html,format_pseudo_msword'
75-
);
76-
$tlCfg->reports_list['test_report'] = array(
75+
];
76+
$tlCfg->reports_list['test_report'] = [
7777
'title' => 'link_report_test_report',
7878
'url' => 'lib/results/printDocOptions.php?type=' . DOC_TEST_PLAN_EXECUTION,
7979
'enabled' => 'all',
8080
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=test_report',
8181
'format' => 'format_html,format_pseudo_msword'
82-
);
82+
];
8383

84-
$tlCfg->reports_list['test_report_on_build'] = array(
84+
$tlCfg->reports_list['test_report_on_build'] = [
8585
'title' => 'link_report_test_report_on_build',
8686
'url' => 'lib/results/printDocOptions.php?type=' .
8787
DOC_TEST_PLAN_EXECUTION_ON_BUILD,
8888
'enabled' => 'all',
8989
'format' => 'format_html,format_pseudo_msword'
90-
);
90+
];
9191

92-
$tlCfg->reports_list['metrics_tp_general'] = array(
92+
$tlCfg->reports_list['metrics_tp_general'] = [
9393
'title' => 'link_report_general_tp_metrics',
9494
'url' => 'lib/results/resultsGeneral.php',
9595
'enabled' => 'all',
9696
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&format=0&type=metrics_tp_general',
9797
'format' => 'format_html,format_pseudo_ods'
98-
);
98+
];
9999

100-
$tlCfg->reports_list['report_by_tsuite'] = array(
100+
$tlCfg->reports_list['report_by_tsuite'] = [
101101
'title' => 'link_report_by_tsuite',
102102
'url' => 'lib/results/resultsByTSuite.php',
103103
'enabled' => 'all',
104104
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&format=0&type=report_by_tsuite',
105105
'format' => 'format_html'
106-
);
106+
];
107107

108-
$tlCfg->reports_list['baseline_l1l2'] = array(
108+
$tlCfg->reports_list['baseline_l1l2'] = [
109109
'title' => 'baseline_l1l2',
110110
'url' => 'lib/results/baselinel1l2.php',
111111
'enabled' => 'all',
112112
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&format=0' .
113113
'&type=baseline_l1l2',
114114
'format' => 'format_html'
115-
);
115+
];
116116

117-
$tlCfg->reports_list['results_by_tester_per_build'] = array(
117+
$tlCfg->reports_list['results_by_tester_per_build'] = [
118118
'title' => 'link_report_by_tester_per_build',
119119
'url' => 'lib/results/resultsByTesterPerBuild.php',
120120
'enabled' => 'all',
121121
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&format=0&type=results_by_tester_per_build',
122122
'format' => 'format_html'
123-
);
123+
];
124124

125-
$tlCfg->reports_list['assigned_tc_overview'] = array(
125+
$tlCfg->reports_list['assigned_tc_overview'] = [
126126
'title' => 'link_assigned_tc_overview',
127127
'url' => 'lib/testcases/tcAssignedToUser.php?show_all_users=1&show_inactive_and_closed=1',
128128
'enabled' => 'all',
129129
'directLink' => '',
130130
'format' => 'format_html'
131-
);
131+
];
132132

133133
// will be released in future because refactoring is not completed
134134
// $tlCfg->reports_list['results_custom_query'] = array(
@@ -137,92 +137,92 @@
137137
// 'enabled' => 'all', 'directLink' => '',
138138
// 'format' => 'format_html,format_ods,format_xls,format_mail_html'
139139
// );
140-
$tlCfg->reports_list['results_matrix'] = array(
140+
$tlCfg->reports_list['results_matrix'] = [
141141
'title' => 'link_report_test',
142142
'url' => 'lib/results/resultsTC.php',
143143
'enabled' => 'all',
144144
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=results_matrix',
145145
'format' => 'format_html,format_pseudo_ods'
146-
);
146+
];
147147

148-
$tlCfg->reports_list['results_flat'] = array(
148+
$tlCfg->reports_list['results_flat'] = [
149149
'title' => 'link_report_test_flat',
150150
'url' => 'lib/results/resultsTCFlat.php',
151151
'enabled' => 'all',
152152
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=results_flat',
153153
'format' => 'format_html,format_mail_html'
154-
);
154+
];
155155

156156
/* 20191210 */
157-
$tlCfg->reports_list['abslatest_results_matrix'] = array(
157+
$tlCfg->reports_list['abslatest_results_matrix'] = [
158158
'title' => 'link_report_test_absolute_latest_exec',
159159
'url' => 'lib/results/resultsTCAbsoluteLatest.php',
160160
'enabled' => 'all',
161161
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=results_matrix',
162162
'format' => 'format_html,format_pseudo_ods'
163-
);
163+
];
164164

165-
$tlCfg->reports_list['list_tc_failed'] = array(
165+
$tlCfg->reports_list['list_tc_failed'] = [
166166
'title' => 'link_report_failed',
167167
'url' => 'lib/results/resultsByStatus.php?type=' .
168168
$tlCfg->results['status_code']['failed'],
169169
'enabled' => 'all',
170170
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=list_tc_failed',
171171
'format' => 'format_html,format_pseudo_ods'
172-
);
173-
$tlCfg->reports_list['list_tc_blocked'] = array(
172+
];
173+
$tlCfg->reports_list['list_tc_blocked'] = [
174174
'title' => 'link_report_blocked_tcs',
175175
'url' => 'lib/results/resultsByStatus.php?type=' .
176176
$tlCfg->results['status_code']['blocked'],
177177
'enabled' => 'all',
178178
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=list_tc_blocked',
179179
'format' => 'format_html,format_pseudo_ods'
180-
);
180+
];
181181

182-
$tlCfg->reports_list['list_tc_not_run'] = array(
182+
$tlCfg->reports_list['list_tc_not_run'] = [
183183
'title' => 'link_report_not_run',
184184
'url' => 'lib/results/resultsByStatus.php?type=' .
185185
$tlCfg->results['status_code']['not_run'],
186186
'enabled' => 'all',
187187
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=list_tc_not_run',
188188
'format' => 'format_html,format_pseudo_ods',
189-
'misc' => array(
189+
'misc' => [
190190
'bugs_not_linked' => false
191-
)
192-
);
191+
]
192+
];
193193

194-
$tlCfg->reports_list['never_run'] = array(
194+
$tlCfg->reports_list['never_run'] = [
195195
'title' => 'link_report_never_run',
196196
'url' => 'lib/results/neverRunByPP.php',
197197
'enabled' => 'all',
198198
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=never_run',
199199
'format' => 'format_html,format_pseudo_ods',
200-
'misc' => array(
200+
'misc' => [
201201
'bugs_not_linked' => false
202-
)
203-
);
202+
]
203+
];
204204

205-
$tlCfg->reports_list['tcases_without_tester'] = array(
205+
$tlCfg->reports_list['tcases_without_tester'] = [
206206
'title' => 'link_report_tcases_without_tester',
207207
'url' => 'lib/results/testCasesWithoutTester.php',
208208
'enabled' => 'all',
209209
'directLink' => '',
210210
'format' => 'format_html'
211-
);
212-
$tlCfg->reports_list['charts_basic'] = array(
211+
];
212+
$tlCfg->reports_list['charts_basic'] = [
213213
'title' => 'link_charts',
214214
'url' => 'lib/results/charts.php',
215215
'enabled' => 'all',
216216
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&type=charts_basic',
217217
'format' => 'format_html'
218-
);
219-
$tlCfg->reports_list['results_requirements'] = array(
218+
];
219+
$tlCfg->reports_list['results_requirements'] = [
220220
'title' => 'link_report_reqs_coverage',
221221
'url' => 'lib/results/resultsReqs.php',
222222
'enabled' => 'req',
223223
'directLink' => '',
224224
'format' => 'format_html'
225-
);
225+
];
226226

227227
// disabled TICKET 37006 - disabled uncovered_testcases report
228228
// $tlCfg->reports_list['uncovered_testcases'] = array(
@@ -232,54 +232,54 @@
232232
// 'format' => 'format_html'
233233
// );
234234

235-
$tlCfg->reports_list['list_problems'] = array(
235+
$tlCfg->reports_list['list_problems'] = [
236236
'title' => 'link_report_total_bugs',
237237
'url' => 'lib/results/resultsBugs.php?type=0',
238238
'enabled' => 'bts',
239239
'directLink' => '',
240240
'format' => 'format_html'
241-
);
241+
];
242242

243-
$tlCfg->reports_list['issues_all_exec'] = array(
243+
$tlCfg->reports_list['issues_all_exec'] = [
244244
'title' => 'link_report_total_bugs_all_exec',
245245
'url' => 'lib/results/resultsBugs.php?type=1',
246246
'enabled' => 'bts',
247247
'directLink' => '',
248248
'format' => 'format_html'
249-
);
249+
];
250250

251-
$tlCfg->reports_list['tcases_with_cf'] = array(
251+
$tlCfg->reports_list['tcases_with_cf'] = [
252252
'title' => 'link_report_tcases_with_cf',
253253
'url' => 'lib/results/testCasesWithCF.php',
254254
'enabled' => 'all',
255255
'directLink' => '',
256256
'format' => 'format_html'
257-
);
258-
$tlCfg->reports_list['tplan_with_cf'] = array(
257+
];
258+
$tlCfg->reports_list['tplan_with_cf'] = [
259259
'title' => 'link_report_tplans_with_cf',
260260
'url' => 'lib/results/testPlanWithCF.php',
261261
'enabled' => 'all',
262262
'directLink' => '',
263263
'format' => 'format_html'
264-
);
264+
];
265265

266-
$tlCfg->reports_list['free_tcases'] = array(
266+
$tlCfg->reports_list['free_tcases'] = [
267267
'title' => 'link_report_free_testcases_on_testproject',
268268
'url' => 'lib/results/freeTestCases.php',
269269
'enabled' => 'all',
270270
'directLink' => '',
271271
'format' => 'format_html'
272-
);
272+
];
273273

274274
$report = 'report_exec_timeline';
275-
$tlCfg->reports_list[$report] = array(
275+
$tlCfg->reports_list[$report] = [
276276
'title' => 'link_report_exec_timeline',
277277
'url' => 'lib/results/execTimelineStats.php',
278278
'enabled' => 'all',
279279
'directLink' => '%slnl.php?apikey=%s&tproject_id=%s&tplan_id=%s&format=0' .
280280
'&type=' . $report,
281281
'format' => 'format_html'
282-
);
282+
];
283283

284284
// Add custom configuration
285285
clearstatcache();

0 commit comments

Comments
 (0)