Code Duplication    Length = 13-13 lines in 2 locations

Repositories/Eloquent/EloquentPageRepository.php 2 locations

@@ 36-48 (lines=13) @@
33
     * @param  mixed  $data
34
     * @return object
35
     */
36
    public function create($data)
37
    {
38
        if (array_get($data, 'is_home') === '1') {
39
            $this->removeOtherHomepage();
40
        }
41
        $page = $this->model->create($data);
42
43
        event(new PageWasCreated($page->id, $data));
44
45
        $page->setTags(array_get($data, 'tags', []));
46
47
        return $page;
48
    }
49
50
    /**
51
     * @param $model
@@ 55-67 (lines=13) @@
52
     * @param  array  $data
53
     * @return object
54
     */
55
    public function update($model, $data)
56
    {
57
        if (array_get($data, 'is_home') === '1') {
58
            $this->removeOtherHomepage($model->id);
59
        }
60
        $model->update($data);
61
62
        event(new PageWasUpdated($model->id, $data));
63
64
        $model->setTags(array_get($data, 'tags', []));
65
66
        return $model;
67
    }
68
69
    public function destroy($page)
70
    {