Code Duplication    Length = 9-9 lines in 2 locations

core/db_classes/EE_Base_Class.class.php 2 locations

@@ 2296-2304 (lines=9) @@
2293
     * @return int how many deleted
2294
     * @throws \EE_Error
2295
     */
2296
    public function delete_related($relationName, $query_params = array())
2297
    {
2298
        if ($this->ID()) {
2299
            $count = $this->get_model()->delete_related($this, $relationName, $query_params);
2300
        } else {
2301
            $count = count($this->get_all_from_cache($relationName));
2302
            $this->clear_cache($relationName, null, true);
2303
        }
2304
        return $count;
2305
    }
2306
2307
@@ 2321-2329 (lines=9) @@
2318
     * @return int how many deleted (including those soft deleted)
2319
     * @throws \EE_Error
2320
     */
2321
    public function delete_related_permanently($relationName, $query_params = array())
2322
    {
2323
        if ($this->ID()) {
2324
            $count = $this->get_model()->delete_related_permanently($this, $relationName, $query_params);
2325
        } else {
2326
            $count = count($this->get_all_from_cache($relationName));
2327
        }
2328
        $this->clear_cache($relationName, null, true);
2329
        return $count;
2330
    }
2331
2332