Code Duplication    Length = 3-3 lines in 2 locations

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

@@ 122-124 (lines=3) @@
119
                foreach ($this->readdmesg() as $line2) {
120
                    if (preg_match("/^(".$ar_buf[1]."): (.*), (.*), (.*)MB, .*$/", $line2, $ar_buf_n)) {
121
                        $dev->setCapacity($ar_buf_n[4] * 2048 * 1.049);
122
                    } elseif (preg_match("/^(".$ar_buf[1]."): (.*) MB, (.*), (.*), .*$/", $line2, $ar_buf_n)) {
123
                        $dev->setCapacity($ar_buf_n[2] * 2048);
124
                    }
125
                }
126
                $this->sys->setIdeDevices($dev);
127
            }

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

@@ 120-122 (lines=3) @@
117
                $dev->setName($ar_buf[0]);
118
                // now loop again and find the capacity
119
                foreach ($this->readdmesg() as $line2) {
120
                    if (preg_match("/^(".$ar_buf[0]."): (.*), (.*), (.*)MB, .*$/", $line2, $ar_buf_n)) {
121
                        $dev->setCapacity($ar_buf_n[4] * 2048 * 1.049);
122
                    }
123
                }
124
                $this->sys->setIdeDevices($dev);
125
            }