Skip to content

Commit fb457d0

Browse files
committed
Cleaned up code - some adjustments to selected files
The following adjustments were made: - Files should end with a newline (PHP:S113) - Lines should not end with trailing whitespaces (PHP:S1131) - Unused local variables should be removed (PHP:S1481) - The "var" keyword should not be used (PHP:S1765) - Method visibility should be explicitly declared (PHP:S1784)
1 parent 573922b commit fb457d0

5 files changed

Lines changed: 174 additions & 182 deletions

File tree

lib/cfields/cfieldsEdit.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
$args = init_args();
1616
$gui = initializeGui($cfield_mgr);
1717

18-
19-
$result_msg = null;
2018
$do_control_combo_display = 1;
2119
$cfMix = getCFCfg($args,$cfield_mgr);
2220
$cfieldCfg = $cfMix->cfieldCfg;
@@ -285,7 +283,7 @@ function edit(&$argsObj,&$cfieldMgr)
285283

286284
/**
287285
*
288-
* @param unknown $hash_request
286+
* @param array $hash_request
289287
* @param cfield_mgr $cfieldMgr
290288
* @param stdClass $argsObj
291289
* @return stdClass

lib/functions/assignment_mgr.class.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
class assignment_mgr extends tlObjectWithDB
2323
{
2424

25-
function __construct(&$db)
25+
public function __construct(&$db)
2626
{
2727
parent::__construct($db);
2828
}
@@ -31,7 +31,7 @@ function __construct(&$db)
3131
/**
3232
*
3333
* @param string $key_field contains the filename that has to be used as the key of the returned hash.
34-
* @return array
34+
* @return array
3535
*/
3636
public function get_available_types($key_field='description')
3737
{
@@ -48,7 +48,7 @@ public function get_available_types($key_field='description')
4848
/**
4949
*
5050
* @param string $key_field contains the name column that has to be used as the key of the returned hash.
51-
* @return array
51+
* @return array
5252
*/
5353
public function get_available_status($key_field='description')
5454
{
@@ -67,7 +67,7 @@ public function get_available_status($key_field='description')
6767
*
6868
* @param int or array $feature_id
6969
*/
70-
function delete_by_feature_id($feature_id)
70+
public function delete_by_feature_id($feature_id)
7171
{
7272
if( is_array($feature_id) )
7373
{
@@ -90,7 +90,7 @@ function delete_by_feature_id($feature_id)
9090
* @param boolean $delete_all_types If true, all assignments regardless of type will be deleted,
9191
* else (default) only tester assignments.
9292
*/
93-
function delete_by_build_id($build_id, $delete_all_types = false)
93+
public function delete_by_build_id($build_id, $delete_all_types = false)
9494
{
9595
$type_sql = "";
9696

@@ -113,7 +113,7 @@ function delete_by_build_id($build_id, $delete_all_types = false)
113113
*
114114
* @param array $feature_map
115115
*/
116-
function delete_by_feature_id_and_build_id($feature_map)
116+
public function delete_by_feature_id_and_build_id($feature_map)
117117
{
118118
$feature_id_list = implode(",",array_keys($feature_map));
119119
$where_clause = " WHERE feature_id IN ($feature_id_list) ";
@@ -245,7 +245,7 @@ public function assign($feature_map)
245245
*
246246
* @internal revisions
247247
*/
248-
function update($feature_map)
248+
public function update($feature_map)
249249
{
250250
foreach($feature_map as $feature_id => $elem)
251251
{
@@ -312,7 +312,7 @@ public function get_count_of_assignments_for_build_id($build_id, $count_all_type
312312
*
313313
* @internal revisions
314314
*/
315-
function get_not_run_tc_count_per_build($build_id, $all_types = false, $user_id = 0)
315+
public function get_not_run_tc_count_per_build($build_id, $all_types = false, $user_id = 0)
316316
{
317317
$count = 0;
318318

@@ -414,7 +414,7 @@ public function copy_assignments($source_build_id, $target_build_id,
414414
* @param mixed $buildID can be single value or array of build ID.
415415
* @return unknown
416416
*/
417-
function getExecAssignmentsCountByBuild($buildID)
417+
private function getExecAssignmentsCountByBuild($buildID)
418418
{
419419
$debugMsg = 'Class:' . __CLASS__ . ' - Method: ' . __FUNCTION__;
420420
$rs = null;
@@ -441,7 +441,7 @@ function getExecAssignmentsCountByBuild($buildID)
441441
* @param mixed $buildID can be single value or array of build ID.
442442
* @return unknown
443443
*/
444-
function getNotRunAssignmentsCountByBuild($buildID)
444+
private function getNotRunAssignmentsCountByBuild($buildID)
445445
{
446446
$debugMsg = 'Class:' . __CLASS__ . ' - Method: ' . __FUNCTION__;
447447
$rs = null;

0 commit comments

Comments
 (0)