Code Duplication    Length = 10-10 lines in 2 locations

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.

src/Model/EloquentModel.php 1 location

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