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

@@ 701-710 (lines=10) @@
698
     * @param array $items
699
     * @return EntryCollection
700
     */
701
    public function newCollection(array $items = [])
702
    {
703
        $collection = substr(get_class($this), 0, -5) . 'Collection';
704
705
        if (class_exists($collection)) {
706
            return new $collection($items);
707
        }
708
709
        return new EntryCollection($items);
710
    }
711
712
    /**
713
     * Return the entry presenter.