OAuthIdentity   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 44
ccs 0
cts 12
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A configureTable() 0 4 1
A getTable() 0 4 1
A user() 0 4 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Database\Eloquent\Model as Eloquent;
6
7
/**
8
 * @property $id
9
 * @property $provider_user_id
10
 * @property $provider
11
 * @property $access_token
12
 * @property $user_id
13
 * @property $avatar
14
 * @property $name
15
 * @property $nickname
16
 */
17
class OAuthIdentity extends Eloquent
18
{
19
    /**
20
     * The attributes that are mass assignable.
21
     *
22
     * @var array
23
     */
24
    protected $fillable = [
25
        'id', 'provider_user_id', 'provider', 'access_token', 'user_id', 'avatar', 'name', 'nickname',
26
    ];
27
28
    /**
29
     * The attributes that should be hidden for arrays.
30
     *
31
     * @var array
32
     */
33
    protected $hidden = [];
34
35
    /**
36
     * The table associated with the model.
37
     *
38
     * @var string
39
     */
40
    protected $table = 'oauth_identities';
41
    protected static $configuredTable = 'oauth_identities';
42
43
    public static function configureTable($table)
44
    {
45
        static::$configuredTable = $table;
46
    }
47
48
    public function getTable()
49
    {
50
        return static::$configuredTable;
51
    }
52
53
    /**
54
     * Get the user that owns the oauth identity.
55
     */
56
    public function user()
57
    {
58
        return $this->belongsTo(\App\User::class);
59
    }
60
}
61