Code Duplication    Length = 14-14 lines in 2 locations

phpsysinfo/includes/output/class.WebpageXML.inc.php 2 locations

@@ 71-84 (lines=14) @@
68
69
            // check if there is a valid sensor configuration in phpsysinfo.ini
70
            $foundsp = array();
71
            if (defined('PSI_SENSOR_PROGRAM') && is_string(PSI_SENSOR_PROGRAM)) {
72
                if (preg_match(ARRAY_EXP, PSI_SENSOR_PROGRAM)) {
73
                    $sensorprograms = eval(strtolower(PSI_SENSOR_PROGRAM));
74
                } else {
75
                    $sensorprograms = array(strtolower(PSI_SENSOR_PROGRAM));
76
                }
77
                foreach ($sensorprograms as $sensorprogram) {
78
                    if (!file_exists(APP_ROOT.'/includes/mb/class.'.$sensorprogram.'.inc.php')) {
79
                        $this->error->addError("file_exists(class.".htmlspecialchars($sensorprogram).".inc.php)", "specified sensor program is not supported");
80
                    } else {
81
                        $foundsp[] = $sensorprogram;
82
                    }
83
                }
84
            }
85
86
            /**
87
             * motherboard information
@@ 95-108 (lines=14) @@
92
93
            // check if there is a valid ups configuration in phpsysinfo.ini
94
            $foundup = array();
95
            if (defined('PSI_UPS_PROGRAM') && is_string(PSI_UPS_PROGRAM)) {
96
                if (preg_match(ARRAY_EXP, PSI_UPS_PROGRAM)) {
97
                    $upsprograms = eval(strtolower(PSI_UPS_PROGRAM));
98
                } else {
99
                    $upsprograms = array(strtolower(PSI_UPS_PROGRAM));
100
                }
101
                foreach ($upsprograms as $upsprogram) {
102
                    if (!file_exists(APP_ROOT.'/includes/ups/class.'.$upsprogram.'.inc.php')) {
103
                        $this->error->addError("file_exists(class.".htmlspecialchars($upsprogram).".inc.php)", "specified UPS program is not supported");
104
                    } else {
105
                        $foundup[] = $upsprogram;
106
                    }
107
                }
108
            }
109
            /**
110
             * ups information
111
             *