Code Duplication    Length = 9-9 lines in 2 locations

code/model/ShareThisDataObject.php 2 locations

@@ 186-194 (lines=9) @@
183
            }
184
        }
185
        $inc = Config::inst()->get(ShareThisSTE::class, "included_icons");
186
        foreach ($inc as $key) {
187
            $object = ShareThisDataObject::get()->filter(array('Title' => $key, 'IncludeThisIcon' => 0));
188
            if ($object->exists()) {
189
                $object = $object->first();
190
                $object->IncludeThisIcon = true;
191
                $object->write();
192
                DB::alteration_message("Updated inclusion for $key", 'created');
193
            }
194
        }
195
        $exc = Config::inst()->get(ShareThisSTE::class, "excluded_icons");
196
        foreach ($exc as $key) {
197
            $object = ShareThisDataObject::get()->filter(array('Title' => $key, 'IncludeThisIcon' => 1));
@@ 196-204 (lines=9) @@
193
            }
194
        }
195
        $exc = Config::inst()->get(ShareThisSTE::class, "excluded_icons");
196
        foreach ($exc as $key) {
197
            $object = ShareThisDataObject::get()->filter(array('Title' => $key, 'IncludeThisIcon' => 1));
198
            if ($object->exists()) {
199
                $object = $object->first();
200
                $object->IncludeThisIcon = false;
201
                $object->write();
202
                DB::alteration_message("Updated inclusion for $key", 'created');
203
            }
204
        }
205
    }
206
}
207