private function markDuplicates($list)
    {
        $duplicates = $this->findDuplicates($list, 'MetaTitle')->map('ID', 'ID')->toArray();
        $duplicateList = new ArrayList();

        foreach ($list as $item) {
            if (in_array($item->ID, $duplicates)) {
                $item->IsDuplicate = true;
                $duplicateList->push($item);
            }
        }

        $duplicates = $this->findDuplicates($list, 'MetaDescription')->map('ID', 'ID')->toArray();
        foreach ($list as $item) {
            if (in_array($item->ID, $duplicates)) {
                $item->IsDuplicate = true;
                if (!$list->byID($item->ID)) {
                    $duplicateList->push($item);
                }
            }
        }

        $duplicateList->merge($list);
        $duplicateList->removeDuplicates();
        return $duplicateList;
    }
private function markDuplicates($list)
    {
        $duplicates = $this->findDuplicates($list, 'MetaTitle')->map('ID', 'ID')->toArray();
        $duplicateList = new ArrayList();

        foreach ($list as $item) {
            if (in_array($item->ID, $duplicates)) {
                $item->IsDuplicate = true;
                $duplicateList->push($item);
            }
        }

        $duplicates = $this->findDuplicates($list, 'MetaDescription')->map('ID', 'ID')->toArray();
        foreach ($list as $item) {
            if (in_array($item->ID, $duplicates)) {
                $item->IsDuplicate = true;
                if (!$list->byID($item->ID)) {
                    $duplicateList->push($item);
                }
            }
        }

        $duplicateList->merge($list);
        $duplicateList->removeDuplicates();
        return $duplicateList;
    }
private function markDuplicates ( $ list ) { $ duplicates = $ this -> findDuplicates ( $ list , 'MetaTitle' ) -> map ( 'ID' , 'ID' ) -> toArray ( ) ; $ duplicateList = new ArrayList ( ) ; foreach ( $ list as $ item ) { if ( in_array ( $ item -> ID , $ duplicates ) ) { $ item -> IsDuplicate = true ; $ duplicateList -> push ( $ item ) ; } } $ duplicates = $ this -> findDuplicates ( $ list , 'MetaDescription' ) -> map ( 'ID' , 'ID' ) -> toArray ( ) ; foreach ( $ list as $ item ) { if ( in_array ( $ item -> ID , $ duplicates ) ) { $ item -> IsDuplicate = true ; if ( ! $ list -> byID ( $ item -> ID ) ) { $ duplicateList -> push ( $ item ) ; } } } $ duplicateList -> merge ( $ list ) ; $ duplicateList -> removeDuplicates ( ) ; return $ duplicateList ; }
Mark duplicate attributes

@param SS_List $list
@return SS_List
Mark duplicate attributes