Code Duplication    Length = 6-6 lines in 2 locations

phpsysinfo/includes/ups/class.apcupsd.inc.php 1 location

@@ 48-53 (lines=6) @@
45
            } else {
46
                $upses = array(PSI_UPS_APCUPSD_LIST);
47
            }
48
            foreach ($upses as $ups) {
49
                CommonFunctions::executeProgram('apcaccess', 'status '.trim($ups), $temp);
50
                if (! empty($temp)) {
51
                    $this->_output[] = $temp;
52
                }
53
            }
54
        } else { //use default if address and port not defined
55
            CommonFunctions::executeProgram('apcaccess', 'status', $temp);
56
            if (! empty($temp)) {

phpsysinfo/includes/ups/class.nut.inc.php 1 location

@@ 62-67 (lines=6) @@
59
        } else { //use default if address and port not defined
60
            CommonFunctions::executeProgram('upsc', '-l', $output);
61
            $ups_names = preg_split("/\n/", $output, -1, PREG_SPLIT_NO_EMPTY);
62
            foreach ($ups_names as $ups_name) {
63
                CommonFunctions::executeProgram('upsc', trim($ups_name), $temp);
64
                if (! empty($temp)) {
65
                    $this->_output[trim($ups_name)] = $temp;
66
                }
67
            }
68
        }
69
    }
70