Passed
Push — master ( 2c3721...94fb22 )
by Grant
09:10 queued 10s
created

BackpackUser   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 5
dl 0
loc 26
ccs 0
cts 5
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getEmailForPasswordReset() 0 3 1
A sendPasswordResetNotification() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use App\Models\User;
6
use Backpack\Base\app\Notifications\ResetPasswordNotification as ResetPasswordNotification;
7
use Tightenco\Parental\HasParentModel;
8
9
class BackpackUser extends User
10
{
11
    use HasParentModel;
0 ignored issues
show
Bug introduced by
The trait Tightenco\Parental\HasParentModel requires the property $returnsChildModels which is not provided by App\Models\BackpackUser.
Loading history...
12
13
    protected $table = 'users';
1 ignored issue
show
introduced by
Property \App\Models\BackpackUser::$table does not have @var annotation.
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
14
15
    /**
16
     * Send the password reset notification.
17
     *
18
     * @param string $token
1 ignored issue
show
Coding Style Documentation introduced by
Missing parameter comment
Loading history...
19
     *
20
     * @return void
21
     */
22
    public function sendPasswordResetNotification($token)
1 ignored issue
show
introduced by
Method \App\Models\BackpackUser::sendPasswordResetNotification() does not have parameter type hint for its parameter $token but it should be possible to add it based on @param annotation "string".
Loading history...
introduced by
Method \App\Models\BackpackUser::sendPasswordResetNotification() does not have return type hint for its return value but it should be possible to add it based on @return annotation "void".
Loading history...
Coding Style introduced by
Type hint "string" missing for $token
Loading history...
23
    {
24
        $this->notify(new ResetPasswordNotification($token));
25
    }
26
27
    /**
28
     * Get the e-mail address where password reset links are sent.
29
     *
30
     * @return string
31
     */
32
    public function getEmailForPasswordReset()
0 ignored issues
show
introduced by
Method \App\Models\BackpackUser::getEmailForPasswordReset() does not have return type hint for its return value but it should be possible to add it based on @return annotation "string".
Loading history...
33
    {
34
        return $this->email;
35
    }
36
}
37