Code Duplication    Length = 15-15 lines in 2 locations

app/Repository/Traits/User/CrudTrait.php 1 location

@@ 35-49 (lines=15) @@
32
     *
33
     * @return bool
34
     */
35
    public function createUser(array $info)
36
    {
37
        $insert = [
38
            'email'     => $info['email'],
39
            'firstname' => $info['firstname'],
40
            'lastname'  => $info['lastname'],
41
            'role_id'   => $info['role_id'],
42
            'private'   => (boolean) $info['private'],
43
            'password'  => Hash::make($info['password']),
44
            'status'    => $info['status'],
45
            'language'  => app('tinyissue.settings')->getLanguage(),
46
        ];
47
48
        return $this->fill($insert)->save();
49
    }
50
51
    /**
52
     * Soft deletes a user and empties the email.

app/Repository/User/UpdaterRepository.php 1 location

@@ 40-54 (lines=15) @@
37
     *
38
     * @return bool
39
     */
40
    public function create(array $info)
41
    {
42
        $insert = [
43
            'email'     => $info['email'],
44
            'firstname' => $info['firstname'],
45
            'lastname'  => $info['lastname'],
46
            'role_id'   => $info['role_id'],
47
            'private'   => (boolean) $info['private'],
48
            'password'  => Hash::make($info['password']),
49
            'status'    => $info['status'],
50
            'language'  => app('tinyissue.settings')->getLanguage(),
51
        ];
52
53
        return $this->model->fill($insert)->save();
54
    }
55
56
    /**
57
     * Soft deletes a user and empties the email.