Code Duplication    Length = 9-9 lines in 2 locations

core/db_classes/EE_Base_Class.class.php 2 locations

@@ 2344-2352 (lines=9) @@
2341
     * @return int how many deleted
2342
     * @throws EE_Error
2343
     */
2344
    public function delete_related($relationName, $query_params = array())
2345
    {
2346
        if ($this->ID()) {
2347
            $count = $this->get_model()->delete_related($this, $relationName, $query_params);
2348
        } else {
2349
            $count = count($this->get_all_from_cache($relationName));
2350
            $this->clear_cache($relationName, null, true);
2351
        }
2352
        return $count;
2353
    }
2354
2355
@@ 2369-2377 (lines=9) @@
2366
     * @return int how many deleted (including those soft deleted)
2367
     * @throws EE_Error
2368
     */
2369
    public function delete_related_permanently($relationName, $query_params = array())
2370
    {
2371
        if ($this->ID()) {
2372
            $count = $this->get_model()->delete_related_permanently($this, $relationName, $query_params);
2373
        } else {
2374
            $count = count($this->get_all_from_cache($relationName));
2375
        }
2376
        $this->clear_cache($relationName, null, true);
2377
        return $count;
2378
    }
2379
2380