Code Duplication    Length = 8-8 lines in 2 locations

Apps/ActiveRecord/User.php 2 locations

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