Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Commit 4e6150b

Browse files
committed
Add return types
1 parent 6e248ff commit 4e6150b

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

src/TwoFactorAuth.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace MichaelDzjap\TwoFactorAuth;
44

5-
use App\User;
5+
use Illuminate\Database\Eloquent\Relations\BelongsTo;
66
use Illuminate\Database\Eloquent\Model;
77

88
class 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
}

src/TwoFactorAuthenticable.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22

33
namespace MichaelDzjap\TwoFactorAuth;
44

5+
use Illuminate\Database\Eloquent\Relations\HasOne;
56
use MichaelDzjap\TwoFactorAuth\TwoFactorAuth;
67

78
trait 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
}

0 commit comments

Comments
 (0)