Code Duplication    Length = 4-7 lines in 2 locations

phpsysinfo/includes/os/class.QNX.inc.php 1 location

@@ 203-209 (lines=7) @@
200
                    $was = true;
201
                } else {
202
                    if ($was) {
203
                        if (defined('PSI_SHOW_NETWORK_INFOS') && (PSI_SHOW_NETWORK_INFOS)) {
204
                            if (preg_match('/^\s+address:\s*(\S+)/i', $line, $ar_buf2)) {
205
                                    $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').preg_replace('/:/', '-', strtoupper($ar_buf2[1])));
206
                            } elseif (preg_match('/^\s+inet\s+(\S+)\s+netmask/i', $line, $ar_buf2))
207
                                $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$ar_buf2[1]);
208
209
                        }
210
                    }
211
                }
212
            }

phpsysinfo/includes/os/class.SunOS.inc.php 1 location

@@ 183-186 (lines=4) @@
180
                        if (CommonFunctions::executeProgram('ifconfig', $ar_buf[0], $bufr2, PSI_DEBUG) && ($bufr2!=="")) {
181
                            $bufe2 = preg_split("/\n/", $bufr2, -1, PREG_SPLIT_NO_EMPTY);
182
                            foreach ($bufe2 as $buf2) {
183
                                if (preg_match('/^\s+ether\s+(\S+)/i', $buf2, $ar_buf2))
184
                                    $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').preg_replace('/:/', '-', strtoupper($ar_buf2[1])));
185
                                elseif (preg_match('/^\s+inet\s+(\S+)\s+netmask/i', $buf2, $ar_buf2))
186
                                    $dev->setInfo(($dev->getInfo()?$dev->getInfo().';':'').$ar_buf2[1]);
187
                            }
188
                        }
189
                        if (CommonFunctions::executeProgram('ifconfig', $ar_buf[0].' inet6', $bufr2, PSI_DEBUG) && ($bufr2!=="")) {