Skip to content

Commit 429d6e6

Browse files
committed
Code revised with reactor
Applied rules: * WrapEncapsedVariableInCurlyBracesRector
1 parent 742fba6 commit 429d6e6

140 files changed

Lines changed: 1068 additions & 1068 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/userRightMatrix.php

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -33,112 +33,112 @@
3333

3434
//
3535
$user_admin = array(
36-
"$user_admin_url/usersassign.php" => array(
36+
"{$user_admin_url}/usersassign.php" => array(
3737
"user_role_assignment"
3838
)
3939
);
4040
$proj_admin = array(
41-
"$proj_admin_url/projectEdit.php" => array(
41+
"{$proj_admin_url}/projectEdit.php" => array(
4242
"mgt_modify_product"
4343
)
4444
);
4545
$test_exec = array(
46-
"$test_exec_url/execnavigator.php" => array(
46+
"{$test_exec_url}/execnavigator.php" => array(
4747
"testplan_execute"
4848
)
4949
);
5050

5151
$tplan_admin = array(
52-
"$tplan_admin_url/planupdatetc.php" => array(
52+
"{$tplan_admin_url}/planupdatetc.php" => array(
5353
"testplan_planning"
5454
),
55-
"$tplan_admin_url/planaddtc.php" => array(
55+
"{$tplan_admin_url}/planaddtc.php" => array(
5656
"testplan_planning"
5757
),
58-
"$tplan_admin_url/planaddtcnavigator.php" => array(
58+
"{$tplan_admin_url}/planaddtcnavigator.php" => array(
5959
"testplan_planning"
6060
),
61-
"$tplan_admin_url/planedit.php" => array(
61+
"{$tplan_admin_url}/planedit.php" => array(
6262
"testplan_planning"
6363
),
64-
"$tplan_admin_url/plannew.php" => array(
64+
"{$tplan_admin_url}/plannew.php" => array(
6565
"testplan_planning"
6666
),
67-
"$tplan_admin_url/planpriority.php" => array(
67+
"{$tplan_admin_url}/planpriority.php" => array(
6868
"testplan_planning"
6969
),
70-
"$tplan_admin_url/planupdatetc.php" => array(
70+
"{$tplan_admin_url}/planupdatetc.php" => array(
7171
"testplan_planning"
7272
),
73-
"$tplan_admin_url/planmilestoneedit.php" => array(
73+
"{$tplan_admin_url}/planmilestoneedit.php" => array(
7474
"testplan_planning"
7575
),
76-
"$tplan_admin_url/plantcnavigator.php" => array(
76+
"{$tplan_admin_url}/plantcnavigator.php" => array(
7777
"testplan_planning"
7878
),
79-
"$tplan_admin_url/plantcremove.php" => array(
79+
"{$tplan_admin_url}/plantcremove.php" => array(
8080
"testplan_planning"
8181
)
8282
);
8383

8484
$reports = array(
85-
"$reports_url/resultsallbuilds.php" => array(
85+
"{$reports_url}/resultsallbuilds.php" => array(
8686
"testplan_metrics"
8787
),
88-
"$reports_url/resultsbugs.php" => array(
88+
"{$reports_url}/resultsbugs.php" => array(
8989
"testplan_metrics"
9090
),
91-
"$reports_url/resultsbuild.php" => array(
91+
"{$reports_url}/resultsbuild.php" => array(
9292
"testplan_metrics"
9393
),
94-
"$reports_url/resultsbystatus.php" => array(
94+
"{$reports_url}/resultsbystatus.php" => array(
9595
"testplan_metrics"
9696
),
97-
"$reports_url/resultsgeneral.php" => array(
97+
"{$reports_url}/resultsgeneral.php" => array(
9898
"testplan_metrics"
9999
),
100-
"$reports_url/resultsnavigator.php" => array(
100+
"{$reports_url}/resultsnavigator.php" => array(
101101
"testplan_metrics"
102102
),
103-
"$reports_url/resultssend.php" => array(
103+
"{$reports_url}/resultssend.php" => array(
104104
"testplan_metrics"
105105
),
106-
"$reports_url/resultstc.php" => array(
106+
"{$reports_url}/resultstc.php" => array(
107107
"testplan_metrics"
108108
)
109109
);
110110

111111
$tc_admin = array(
112-
"$tc_admin_url/containeredit.php" => array(
112+
"{$tc_admin_url}/containeredit.php" => array(
113113
"mgt_modify_tc",
114114
"mgt_view_tc"
115115
),
116-
"$tc_admin_url/tcedit.php" => array(
116+
"{$tc_admin_url}/tcedit.php" => array(
117117
"mgt_modify_tc",
118118
"mgt_view_tc"
119119
),
120-
"$tc_admin_url/tcimport.php" => array(
120+
"{$tc_admin_url}/tcimport.php" => array(
121121
"mgt_modify_tc",
122122
"mgt_view_tc"
123123
),
124-
"$tc_admin_url/searchform.php" => null,
125-
"$tc_admin_url/searchdata.php" => null,
126-
"$tc_admin_url/listtestcases.php" => null
124+
"{$tc_admin_url}/searchform.php" => null,
125+
"{$tc_admin_url}/searchdata.php" => null,
126+
"{$tc_admin_url}/listtestcases.php" => null
127127
);
128128

129129
$print_data = array(
130-
"$print_url/printdata.php" => null,
131-
"$print_url/selectdata.php" => null
130+
"{$print_url}/printdata.php" => null,
131+
"{$print_url}/selectdata.php" => null
132132
);
133133

134134
$cf_admin = array(
135-
"$cf_admin_url/cfieldsEdit.php" => array(
135+
"{$cf_admin_url}/cfieldsEdit.php" => array(
136136
"cfield_management"
137137
),
138-
"$cf_admin_url/cfieldsView.php" => array(
138+
"{$cf_admin_url}/cfieldsView.php" => array(
139139
"cfield_view"
140140
),
141-
"$cf_admin_url/cfieldsTProjectAssign.php" => array(
141+
"{$cf_admin_url}/cfieldsTProjectAssign.php" => array(
142142
"cfield_management"
143143
)
144144
);

install/installNewDB.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
if (! $validator->isValid($dbHost)) {
9595
// hostname is invalid; print the reasons
9696
foreach ($validator->getMessages() as $message) {
97-
echo "$message\n";
97+
echo "{$message}\n";
9898
}
9999
die();
100100
}
@@ -238,7 +238,7 @@
238238

239239
if ($conn_result['status'] == 0) {
240240
$db->close();
241-
echo "<br>Database $db_name does not exist. <br>";
241+
echo "<br>Database {$db_name} does not exist. <br>";
242242

243243
if ($upgrade) {
244244
echo "Can't Upgrade";
@@ -283,7 +283,7 @@
283283
$sql_create_db = $db->build_sql_create_db($db_name);
284284

285285
if (! $db->exec_query($sql_create_db)) {
286-
echo "<span class='notok'>Failed!</span></b> - Could not create database: $db! " .
286+
echo "<span class='notok'>Failed!</span></b> - Could not create database: {$db}! " .
287287
$db->error_msg();
288288
$errors += 1;
289289

@@ -410,10 +410,10 @@
410410

411411
echo "<br /><b>Creating Testlink DB user `" . $user_host[0] . "`</b>:";
412412
if (strpos($msg, 'ok -') === false) {
413-
echo "<span class='notok'>Failed!</span></b> - Could not create user: $tl_db_login!";
413+
echo "<span class='notok'>Failed!</span></b> - Could not create user: {$tl_db_login}!";
414414
$errors += 1;
415415
} else {
416-
echo "<span class='ok'>OK! ($msg) </span>";
416+
echo "<span class='ok'>OK! ({$msg}) </span>";
417417
}
418418

419419
// Schema Operations (CREATE, ALTER, ecc).
@@ -629,8 +629,8 @@ function drop_tables(&$dbHandler, $dbTablePrefix, $dbType)
629629
$targetTable = $dbTablePrefix . $tablePlainName;
630630
if (in_array($targetTable, $tablesOnDB)) {
631631
// Need to add option (CASCADE ?) to delete dependent object
632-
echo "Dropping $targetTable" . "<br />";
633-
$sql = "DROP TABLE $targetTable";
632+
echo "Dropping {$targetTable}" . "<br />";
633+
$sql = "DROP TABLE {$targetTable}";
634634
$sql .= (($dbType != 'mssql') && ($dbType != 'sqlsrv')) ? " CASCADE " : ' ';
635635
$dbHandler->exec_query($sql);
636636
}
@@ -652,8 +652,8 @@ function drop_views(&$dbHandler, $dbItemPrefix, $dbType)
652652
$target = $dbItemPrefix . $itemPlainName;
653653
if (in_array($target, $itemsOnDB)) {
654654
// Need to add option (CASCADE ?) to delete dependent object
655-
echo "Dropping $target" . "<br />";
656-
$sql = "DROP VIEW $target";
655+
echo "Dropping {$target}" . "<br />";
656+
$sql = "DROP VIEW {$target}";
657657
$sql .= (($dbType != 'mssql') && ($dbType != 'sqlsrv')) ? " CASCADE " : ' ';
658658
$dbHandler->exec_query($sql);
659659
}

install/installUtils.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,9 @@ function _mysql_make_user($dbhandler, $db_host, $db_name, $login, $passwd)
466466
$safeDBHost = $dbhandler->prepare_string($db_host);
467467
$safeLogin = $dbhandler->prepare_string($login);
468468

469-
$stmt = " CREATE USER '$safeLogin' ";
469+
$stmt = " CREATE USER '{$safeLogin}' ";
470470
if (strlen(trim($db_host)) != 0) {
471-
$stmt .= "@" . "'$safeDBHost'";
471+
$stmt .= "@" . "'{$safeDBHost}'";
472472
}
473473

474474
// to guess if we are using MariaDB or MySQL
@@ -499,11 +499,11 @@ function _mysql_make_user($dbhandler, $db_host, $db_name, $login, $passwd)
499499
// To have compatibility with MySQL 5.x
500500
// IDENTIFIED WITH mysql_native_password
501501
if ($isMySQL) {
502-
$stmt .= " IDENTIFIED WITH mysql_native_password BY '$passwd' ";
502+
$stmt .= " IDENTIFIED WITH mysql_native_password BY '{$passwd}' ";
503503
}
504504

505505
if ($isMariaDB) {
506-
$stmt .= " IDENTIFIED BY '$passwd' ";
506+
$stmt .= " IDENTIFIED BY '{$passwd}' ";
507507
}
508508

509509
echo 'Running..' . $stmt;
@@ -537,7 +537,7 @@ function _mysql_assign_grants($dbhandler, $db_host, $db_name, $login, $passwd)
537537
$safeLogin = $dbhandler->prepare_string($login);
538538

539539
$stmt = "GRANT SELECT, UPDATE, DELETE, INSERT ON
540-
`$safeDBName`.* TO '$safeLogin'@'$safeDBHost'
540+
`{$safeDBName}`.* TO '{$safeLogin}'@'{$safeDBHost}'
541541
WITH GRANT OPTION ";
542542

543543
if (! @$dbhandler->exec_query($stmt)) {
@@ -557,7 +557,7 @@ function _mysql_assign_grants($dbhandler, $db_host, $db_name, $login, $passwd)
557557
//
558558
if (strcasecmp('localhost', $db_host) != 0) {
559559
$stmt = "GRANT SELECT, UPDATE, DELETE, INSERT ON
560-
`$safeDBName`.* TO '$safeLogin'@'localhost'
560+
`{$safeDBName}`.* TO '{$safeLogin}'@'localhost'
561561
WITH GRANT OPTION ";
562562

563563
if (! @$dbhandler->exec_query($stmt)) {

install/util/sysinfo.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,19 @@ function chk_memory($limit = 9, $recommended = 16)
4141

4242
if ($max_memory_int < $limit) {
4343

44-
$msg = "Warning at least $limit M required ($max_memory M available, Recommended $recommended M)";
44+
$msg = "Warning at least {$limit} M required ({$max_memory} M available, Recommended {$recommended} M)";
4545
$type = "error";
4646
} elseif ($max_memory_int < $recommended) {
4747

48-
$msg = "OK (Recommended $recommended M)";
48+
$msg = "OK (Recommended {$recommended} M)";
4949
$type = "pending";
5050
} else {
5151
$msg = "OK";
5252
$type = "done";
5353
}
5454
}
5555

56-
$msg = "<b class='$type'>" . $msg . "</b>";
56+
$msg = "<b class='{$type}'>" . $msg . "</b>";
5757

5858
return $msg;
5959
}

lib/ajax/gettprojectnodes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ function getAllTCasesID($idList, &$tcIDs)
206206
$tcNodeTypeID = 3;
207207

208208
$tbl = DB_TABLE_PREFIX . 'nodes_hierarchy';
209-
$sql = " SELECT id,node_type_id FROM $tbl
210-
WHERE parent_id IN ($idList)
209+
$sql = " SELECT id,node_type_id FROM {$tbl}
210+
WHERE parent_id IN ({$idList})
211211
AND node_type_id IN (3,2) ";
212212

213213
$result = $db->exec_query($sql);

lib/api/rest/v2/tlRestApi.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1175,7 +1175,7 @@ private function getUserIDByAttr($user)
11751175
$run = false;
11761176
$uid = - 1;
11771177

1178-
$sql = "/* $debugMsg */ SELECT id FROM {$this->tables['users']} ";
1178+
$sql = "/* {$debugMsg} */ SELECT id FROM {$this->tables['users']} ";
11791179
if (property_exists($user, 'login')) {
11801180
$run = true;
11811181
$sql .= " WHERE login='" .

lib/api/xmlrpc/v1/poc/php/example01/stepCreateTestPlan.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
$tlIdx ++;
1212
if (! isset($tlTestCasePrefix) || is_null($tlTestCasePrefix)) {
1313
throw new Exception(
14-
"This is intended to be used with $tlTestCasePrefix provided", 1);
14+
"This is intended to be used with {$tlTestCasePrefix} provided", 1);
1515
}
1616

1717
$args = array();

lib/api/xmlrpc/v1/sample_clients/php/clientCreateTestSuite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
$method = 'createTestSuite';
2323

24-
$unitTestDescription = "Test - $method";
24+
$unitTestDescription = "Test - {$method}";
2525
$test_num = 0;
2626
$tlDevKey = '985978c915f50e47a4b1a54a943d1b76';
2727
$tlDevKey = isset($_REQUEST['apiKey']) ? $_REQUEST['apiKey'] : $tlDevKey;

lib/api/xmlrpc/v1/sample_clients/php/clientSample2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
// ----------------------------------------------------------------------
111111
$method = 'getTestCaseCustomFieldDesignValue';
112112
$client_query = 'tl.' . $method;
113-
$unitTestDescription = "Test - $method";
113+
$unitTestDescription = "Test - {$method}";
114114

115115
$args = array();
116116
$args["devKey"] = DEV_KEY;

lib/api/xmlrpc/v1/sample_clients/php/clientUpdateTestSuite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
$method = 'updateTestSuite';
2323

24-
$unitTestDescription = "Test - $method";
24+
$unitTestDescription = "Test - {$method}";
2525
$test_num = 0;
2626
$tlDevKey = '985978c915f50e47a4b1a54a943d1b76';
2727
$tlDevKey = isset($_REQUEST['apiKey']) ? $_REQUEST['apiKey'] : $tlDevKey;

0 commit comments

Comments
 (0)