Code Duplication    Length = 11-11 lines in 2 locations

src/Infrastructure/Model/Repository/Eloquent/EloquentWriteRepository.php 2 locations

@@ 20-30 (lines=11) @@
17
     *
18
     * @return int
19
     */
20
    public function count(Filter $filter = null)
21
    {
22
        $model = self::$instance;
23
        $query = $model->query();
24
25
        if ($filter) {
26
            EloquentFilter::filter($query, $filter);
27
        }
28
29
        return (int) $query->getQuery()->count();
30
    }
31
32
    /**
33
     * Returns whether an entity with the given id exists.
@@ 101-111 (lines=11) @@
98
     *
99
     * @return bool
100
     */
101
    public function removeAll(Filter $filter = null)
102
    {
103
        $model = self::$instance;
104
        $query = $model->query();
105
106
        if ($filter) {
107
            EloquentFilter::filter($query, $filter);
108
        }
109
110
        $query->delete();
111
    }
112
113
    /**
114
     * Repository data is added or removed as a whole block.