Code Duplication    Length = 10-10 lines in 3 locations

src/Model/EloquentModel.php 2 locations

@@ 167-176 (lines=10) @@
164
     * @param  array $items
165
     * @return Collection
166
     */
167
    public function newCollection(array $items = [])
168
    {
169
        $collection = substr(get_class($this), 0, -5) . 'Collection';
170
171
        if (class_exists($collection)) {
172
            return new $collection($items);
173
        }
174
175
        return new EloquentCollection($items);
176
    }
177
178
    /**
179
     * Return the translatable flag.
@@ 305-314 (lines=10) @@
302
     * @param  \Illuminate\Database\Query\Builder $query
303
     * @return \Illuminate\Database\Eloquent\Builder
304
     */
305
    public function newEloquentBuilder($query)
306
    {
307
        $builder = substr(get_class($this), 0, -5) . 'QueryBuilder';
308
309
        if (class_exists($builder)) {
310
            return new $builder($query);
311
        }
312
313
        return new EloquentQueryBuilder($query);
314
    }
315
316
    /*
317
     * Alias for getTranslation()

src/Entry/EntryModel.php 1 location

@@ 752-761 (lines=10) @@
749
     * @param  array $items
750
     * @return EntryCollection
751
     */
752
    public function newCollection(array $items = [])
753
    {
754
        $collection = substr(get_class($this), 0, -5) . 'Collection';
755
756
        if (class_exists($collection)) {
757
            return new $collection($items);
758
        }
759
760
        return new EntryCollection($items);
761
    }
762
763
    /**
764
     * Return the entry presenter.