SocialiteUser   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 15
dl 0
loc 43
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A user() 0 3 1
1
<?php
2
3
namespace Yeelight\Models;
4
5
use Prettus\Repository\Contracts\Transformable;
6
use Prettus\Repository\Traits\TransformableTrait;
7
use Yeelight\Models\Foundation\User;
8
9
/**
10
 * Class SocialiteUser
11
 *
12
 * @category Yeelight
13
 *
14
 * @package Yeelight\Models
15
 *
16
 * @author Sheldon Lee <[email protected]>
17
 *
18
 * @license https://opensource.org/licenses/MIT MIT
19
 *
20
 * @link https://www.yeelight.com
21
 */
22
class SocialiteUser extends BaseModel implements Transformable
23
{
24
    use TransformableTrait;
25
26
    /**
27
     * Indicates if the model should be auto set user_id.
28
     *
29
     * @var bool
30
     */
31
    protected $autoUserId = true;
32
33
    /**
34
     * Indicates if the model should be recorded ips.
35
     *
36
     * @var bool
37
     */
38
    protected $ips = true;
39
40
    /**
41
     * Indicates if the model should be recorded users.
42
     *
43
     * @var bool
44
     */
45
    protected $update_users = true;
46
47
    protected $primaryKey = 'socialite_user_id';
48
49
    protected $fillable = [
50
        'user_id',
51
        'provider',
52
        'provider_user_id',
53
        'oauth_data',
54
        'expires_at',
55
    ];
56
57
    // Fields to be converted to Carbon object automatically
58
    protected $dates = [];
59
60
    protected $guarded = [];
61
62
    public function user()
63
    {
64
        return $this->belongsTo(User::class);
65
    }
66
}
67