Code Duplication    Length = 5-5 lines in 2 locations

app/Repository/Traits/Project/QueryTrait.php 1 location

@@ 100-104 (lines=5) @@
97
        $this->filterCreatedBy($query, array_get($filter, 'created_by'), $this->isPrivateInternal());
98
99
        // Sort
100
        if ($sortBy == 'updated') {
101
            $this->sortByUpdated($query, $sortOrder);
102
        } elseif (($tagGroup = substr($sortBy, strlen('tag:'))) > 0) {
103
            return $this->sortByTag($query, $tagGroup, $sortOrder);
104
        }
105
106
        return $query->get();
107
    }

app/Repository/Project/Fetcher.php 1 location

@@ 90-94 (lines=5) @@
87
            ->whereTags(array_get($filter, 'tag_status'), array_get($filter, 'tag_type'));
88
89
        // Sort
90
        if ($sortBy === 'updated') {
91
            $this->sortByUpdated($query, $sortOrder);
92
        } elseif (($tagGroup = substr($sortBy, strlen('tag:'))) > 0) {
93
            return $this->sortByTag($query, $tagGroup, $sortOrder);
94
        }
95
96
        return $query->get();
97
    }