Code Duplication    Length = 9-11 lines in 3 locations

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

@@ 92-102 (lines=11) @@
89
        }
90
        foreach ($ar_buf as $line) {
91
            $data = array();
92
            if (preg_match("/(.*):(.*).C[ ]*\((.*)=(.*).C,(.*)=(.*).C\)(.*)\)/", $line, $data)) {
93
                ;
94
            } elseif (preg_match("/(.*):(.*).C[ ]*\((.*)=(.*).C,(.*)=(.*).C\)(.*)/", $line, $data)) {
95
                ;
96
            } elseif (preg_match("/(.*):(.*).C[ ]*\((.*)=(.*).C\)(.*)/", $line, $data)) {
97
                ;
98
            } elseif (preg_match("/(.*):(.*).C[ \t]+/", $line, $data)) {
99
                ;
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]);
@@ 183-193 (lines=11) @@
180
        }
181
        foreach ($ar_buf as $line) {
182
            $data = array();
183
            if (preg_match("/(.*):(.*) RPM[ ]*\((.*)=(.*) RPM,(.*)=(.*)\)(.*)\)/", $line, $data)) {
184
                ;
185
            } elseif (preg_match("/(.*):(.*) RPM[ ]*\((.*)=(.*) RPM,(.*)=(.*)\)(.*)/", $line, $data)) {
186
                ;
187
            } elseif (preg_match("/(.*):(.*) RPM[ ]*\((.*)=(.*) RPM\)(.*)/", $line, $data)) {
188
                ;
189
            } elseif (preg_match("/(.*):(.*) RPM[ \t]+/", $line, $data)) {
190
                ;
191
            } else {
192
                preg_match("/(.*):(.*) RPM$/", $line, $data);
193
            }
194
            $dev = new SensorDevice();
195
            $dev->setName(trim($data[1]));
196
            $dev->setValue(trim($data[2]));
@@ 234-242 (lines=9) @@
231
        }
232
        foreach ($ar_buf as $line) {
233
            $data = array();
234
            if (preg_match("/(.*):(.*) V[ ]*\((.*)=(.*) V,(.*)=(.*) V\)(.*)\)/", $line, $data)) {
235
                ;
236
            } elseif (preg_match("/(.*):(.*) V[ ]*\((.*)=(.*) V,(.*)=(.*) V\)(.*)/", $line, $data)) {
237
                ;
238
            } elseif (preg_match("/(.*):(.*) V[ \t]+/", $line, $data)) {
239
                ;
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]);