User::linkedSocialAccounts()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace MedianetDev\LaravelAuthApi\Models;
4
5
use Illuminate\Auth\Authenticatable;
6
use Illuminate\Auth\Passwords\CanResetPassword;
7
use Illuminate\Contracts\Auth\Access\Authorizable as AuthorizableContract;
8
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
9
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
10
use Illuminate\Database\Eloquent\Model;
11
use Illuminate\Foundation\Auth\Access\Authorizable;
12
use Illuminate\Notifications\Notifiable;
13
use MedianetDev\LaravelAuthApi\Http\Controllers\Traits\MustVerifyEmail;
14
15
class User extends Model implements
16
    AuthenticatableContract,
17
    AuthorizableContract,
18
    CanResetPasswordContract
19
{
20
    use Authenticatable, Authorizable, CanResetPassword, MustVerifyEmail, Notifiable;
0 ignored issues
show
Bug introduced by
The trait Illuminate\Notifications\Notifiable requires the property $email which is not provided by MedianetDev\LaravelAuthApi\Models\User.
Loading history...
Bug introduced by
The trait Illuminate\Auth\Authenticatable requires the property $password which is not provided by MedianetDev\LaravelAuthApi\Models\User.
Loading history...
Bug introduced by
The trait Illuminate\Auth\Passwords\CanResetPassword requires the property $email which is not provided by MedianetDev\LaravelAuthApi\Models\User.
Loading history...
introduced by
The trait MedianetDev\LaravelAuthA...\Traits\MustVerifyEmail requires some properties which are not provided by MedianetDev\LaravelAuthApi\Models\User: $email_verified_at, $email
Loading history...
21
22
    /**
23
     * Send the password reset notification.
24
     *
25
     * @param  string  $token
26
     * @return void
27
     */
28
    public function sendPasswordResetNotification($token)
29
    {
30
        // get the notification template from the config file
31
        $passwordTemplate = config('laravel-auth-api.password_notification');
32
        // send the notification
33
        $this->notify(new $passwordTemplate($token));
34
    }
35
36
    /**
37
     * social accounts.
38
     */
39 2
    public function linkedSocialAccounts()
40
    {
41 2
        return $this->hasMany(LinkedSocialAccount::class);
42
    }
43
}
44