This repository was archived by the owner on Apr 19, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 22
33namespace MichaelDzjap \TwoFactorAuth ;
44
5- use App \ User ;
5+ use Illuminate \ Database \ Eloquent \ Relations \ BelongsTo ;
66use Illuminate \Database \Eloquent \Model ;
77
88class TwoFactorAuth extends Model
@@ -34,9 +34,11 @@ class TwoFactorAuth extends Model
3434
3535 /**
3636 * Get the user that owns the two-factor auth.
37+ *
38+ * @param \Illuminate\Database\Eloquent\Relations\BelongsTo
3739 */
38- public function user ()
40+ public function user () : BelongsTo
3941 {
40- return $ this ->belongsTo (User::class);
42+ return $ this ->belongsTo (\ App \ User::class);
4143 }
4244}
Original file line number Diff line number Diff line change 22
33namespace MichaelDzjap \TwoFactorAuth ;
44
5+ use Illuminate \Database \Eloquent \Relations \HasOne ;
56use MichaelDzjap \TwoFactorAuth \TwoFactorAuth ;
67
78trait TwoFactorAuthenticable
89{
910 /**
1011 * Get the two-factor auth record associated with the user.
12+ *
13+ * @return \Illuminate\Database\Eloquent\Relations\HasOne
1114 */
12- public function twoFactorAuth ()
15+ public function twoFactorAuth () : HasOne
1316 {
1417 return $ this ->hasOne (TwoFactorAuth::class);
1518 }
@@ -20,7 +23,7 @@ public function twoFactorAuth()
2023 * @param string $id
2124 * @return void
2225 */
23- public function setTwoFactorAuthId (string $ id )
26+ public function setTwoFactorAuthId (string $ id ) : void
2427 {
2528 $ this ->twoFactorAuth ->update (['id ' => $ id ]);
2629 }
You can’t perform that action at this time.
0 commit comments