Code Duplication    Length = 8-8 lines in 2 locations

Apps/ActiveRecord/User.php 2 locations

@@ 137-144 (lines=8) @@
134
     * @param string $email
135
     * @return bool
136
     */
137
    public static function isMailExist($email)
138
    {
139
        if (!Obj::isString($email) || !Str::isEmail($email)) {
140
            return false;
141
        }
142
143
        return self::where('email', '=', $email)->count() > 0;
144
    }
145
146
    /**
147
     * Check if user with $login is exist
@@ 151-158 (lines=8) @@
148
     * @param string $login
149
     * @return bool
150
     */
151
    public static function isLoginExist($login)
152
    {
153
        if (!Obj::isString($login) || Str::length($login) < 1) {
154
            return false;
155
        }
156
157
        return self::where('login', '=', $login)->count() > 0;
158
    }
159
160
    /**
161
     * Get user person like a object via email