Code Duplication    Length = 10-11 lines in 2 locations

src/NukaCode/Users/Models/User.php 2 locations

@@ 62-71 (lines=10) @@
59
     *
60
     * @return mixed
61
     */
62
    public function isSuperUser()
63
    {
64
        if (config('users.allow_super_user') == true
65
            && $this->super_flag == 1
66
        ) {
67
            return true;
68
        }
69
70
        return false;
71
    }
72
73
    /**
74
     * Grant a user global rights.
@@ 78-88 (lines=11) @@
75
     *
76
     * @return mixed
77
     */
78
    public function makeSuperUser()
79
    {
80
        if (config('users.allow_super_user') == true) {
81
            $this->super_flag = 1;
82
            $this->save();
83
84
            return true;
85
        }
86
        
87
        return false;
88
    }
89
90
    /**
91
     * Order by name ascending scope