Code Duplication    Length = 8-8 lines in 2 locations

Apps/ActiveRecord/User.php 2 locations

@@ 126-133 (lines=8) @@
123
     * @param string $email
124
     * @return bool
125
     */
126
    public static function isMailExist($email)
127
    {
128
        if (!Obj::isString($email) || !Str::isEmail($email)) {
129
            return false;
130
        }
131
132
        return self::where('email', '=', $email)->count() > 0;
133
    }
134
135
    /**
136
     * Check if user with $login is exist
@@ 140-147 (lines=8) @@
137
     * @param string $login
138
     * @return bool
139
     */
140
    public static function isLoginExist($login)
141
    {
142
        if (!Obj::isString($login) || Str::length($login) < 1) {
143
            return false;
144
        }
145
146
        return self::where('login', '=', $login)->count() > 0;
147
    }
148
149
    /**
150
     * Get user person like a object via email