Code Duplication    Length = 2-2 lines in 3 locations

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

@@ 305-306 (lines=2) @@
302
        }
303
304
        $ncpu = $this->grabkey('hw.ncpu');
305
        if (is_null($ncpu) || (trim($ncpu) == "") || (!($ncpu >= 1)))
306
            $ncpu = 1;
307
        for ($ncpu ; $ncpu > 0 ; $ncpu--) {
308
            $this->sys->setCpus($dev);
309
        }

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

@@ 163-164 (lines=2) @@
160
            $dev->setCache(round($buf));
161
        }
162
        $ncpu = $this->grabkey('hw.ncpu');
163
        if (is_null($ncpu) || (trim($ncpu) == "") || (!($ncpu >= 1)))
164
            $ncpu = 1;
165
        for ($ncpu ; $ncpu > 0 ; $ncpu--) {
166
            $this->sys->setCpus($dev);
167
        }

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

@@ 162-163 (lines=2) @@
159
            }
160
        }
161
        $ncpu = $this->grabkey('hw.ncpu');
162
        if (is_null($ncpu) || (trim($ncpu) == "") || (!($ncpu >= 1)))
163
            $ncpu = 1;
164
        for ($ncpu ; $ncpu > 0 ; $ncpu--) {
165
            $this->sys->setCpus($dev);
166
        }