Code Duplication    Length = 7-7 lines in 2 locations

src/Models/TranslationRelation.php 2 locations

@@ 42-48 (lines=7) @@
39
            $this->query
40
                ->where('translatable_id', '<>', $this->parent->getKey())
41
                ->where('translatable_type', '=', get_class($this->parent))
42
                ->whereExists(function (Builder $query) {
43
                    $query->select(DB::raw(1))
44
                        ->from('translations as original')
45
                        ->whereRaw('original.translation_id = translations.translation_id')
46
                        ->where('original.translatable_id', '=', $this->parent->getKey())
47
                        ->where('original.translatable_type', '=', get_class($this->parent));
48
                });
49
        }
50
    }
51
@@ 62-68 (lines=7) @@
59
        $this->query
60
            ->whereNotIn('translatable_id', $ids)
61
            ->where('translatable_type', '=', get_class($this->parent))
62
            ->whereExists(function (Builder $query) use ($ids) {
63
                $query->select(DB::raw(1))
64
                    ->from('translations as original')
65
                    ->whereRaw('translations.translation_id = original.translation_id')
66
                    ->whereIn('original.translatable_id', $ids)
67
                    ->where('original.translatable_type', '=', get_class($this->parent));
68
            });
69
    }
70
71
    /**