public static function removeDupsAndCount($arrDev)
    {
        $result = array();
        foreach ($arrDev as $dev) {
            if (count($result) === 0) {
                array_push($result, $dev);
            } else {
                $found = false;
                foreach ($result as $tmp) {
                    if ($dev->equals($tmp)) {
                        $tmp->setCount($tmp->getCount() + 1);
                        $found = true;
                        break;
                    }
                }
                if (!$found) {
                    array_push($result, $dev);
                }
            }
        }

        return $result;
    }
public static function removeDupsAndCount($arrDev)
    {
        $result = array();
        foreach ($arrDev as $dev) {
            if (count($result) === 0) {
                array_push($result, $dev);
            } else {
                $found = false;
                foreach ($result as $tmp) {
                    if ($dev->equals($tmp)) {
                        $tmp->setCount($tmp->getCount() + 1);
                        $found = true;
                        break;
                    }
                }
                if (!$found) {
                    array_push($result, $dev);
                }
            }
        }

        return $result;
    }
public static function removeDupsAndCount ( $ arrDev ) { $ result = array ( ) ; foreach ( $ arrDev as $ dev ) { if ( count ( $ result ) === 0 ) { array_push ( $ result , $ dev ) ; } else { $ found = false ; foreach ( $ result as $ tmp ) { if ( $ dev -> equals ( $ tmp ) ) { $ tmp -> setCount ( $ tmp -> getCount ( ) + 1 ) ; $ found = true ; break ; } } if ( ! $ found ) { array_push ( $ result , $ dev ) ; } } } return $ result ; }
remove duplicate Entries and Count

@param array $arrDev list of HWDevices

@see HWDevice

@return array
remove duplicate Entries and Count