Code Duplication    Length = 11-11 lines in 2 locations

Repositories/Eloquent/EloquentPageRepository.php 2 locations

@@ 33-43 (lines=11) @@
30
     * @param  mixed  $data
31
     * @return object
32
     */
33
    public function create($data)
34
    {
35
        if (array_get($data, 'is_home') === '1') {
36
            $this->removeOtherHomepage();
37
        }
38
        $page = $this->model->create($data);
39
40
        event(new PageWasCreated($page->id, $data));
41
42
        return $page;
43
    }
44
45
    /**
46
     * @param $model
@@ 50-60 (lines=11) @@
47
     * @param  array  $data
48
     * @return object
49
     */
50
    public function update($model, $data)
51
    {
52
        if (array_get($data, 'is_home') === '1') {
53
            $this->removeOtherHomepage();
54
        }
55
        $model->update($data);
56
57
        event(new PageWasUpdated($model->id, $data));
58
59
        return $model;
60
    }
61
62
    /**
63
     * @param $slug