Code Duplication    Length = 10-10 lines in 2 locations

src/Model/EloquentModel.php 1 location

@@ 129-138 (lines=10) @@
126
     * @param  array $items
127
     * @return Collection
128
     */
129
    public function newCollection(array $items = array())
130
    {
131
        $collection = substr(get_class($this), 0, -5) . 'Collection';
132
133
        if (class_exists($collection)) {
134
            return new $collection($items);
135
        }
136
137
        return new EloquentCollection($items);
138
    }
139
140
    /**
141
     * Return the translatable flag.

src/Entry/EntryModel.php 1 location

@@ 677-686 (lines=10) @@
674
     * @param array $items
675
     * @return EntryCollection
676
     */
677
    public function newCollection(array $items = [])
678
    {
679
        $collection = substr(get_class($this), 0, -5) . 'Collection';
680
681
        if (class_exists($collection)) {
682
            return new $collection($items);
683
        }
684
685
        return new EntryCollection($items);
686
    }
687
688
    /**
689
     * Return the entry presenter.