Code Duplication    Length = 7-7 lines in 2 locations

phpsysinfo/includes/mb/class.lmsensors.inc.php 2 locations

@@ 103-109 (lines=7) @@
100
            } else {
101
                preg_match("/(.*):(.*).C$/", $line, $data);
102
            }
103
            foreach ($data as $key=>$value) {
104
                if (preg_match("/^\+?(-?[0-9\.]+).?$/", trim($value), $newvalue)) {
105
                    $data[$key] = 0+trim($newvalue[1]);
106
                } else {
107
                    $data[$key] = trim($value);
108
                }
109
            }
110
            $dev = new SensorDevice();
111
112
            if (strlen($data[1]) == 4) {
@@ 243-249 (lines=7) @@
240
            } else {
241
                preg_match("/(.*):(.*) V$/", $line, $data);
242
            }
243
            foreach ($data as $key=>$value) {
244
                if (preg_match("/^\+?(-?[0-9\.]+)$/", trim($value), $newvalue)) {
245
                    $data[$key] = 0+trim($newvalue[1]);
246
                } else {
247
                    $data[$key] = trim($value);
248
                }
249
            }
250
            if (isset($data[1])) {
251
                $dev = new SensorDevice();
252
                $dev->setName($data[1]);