Completed
Push — master ( bfbb50...8023d3 )
by Sherif
09:55
created

OauthClient   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 16
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A user() 0 4 1
A boot() 0 5 1
1
<?php
2
3
namespace App\Modules\OauthClients;
4
5
use Laravel\Passport\Client;
6
use App\Modules\Users\AclUser;
7
use App\Modules\OauthClients\ModelObservers\OauthClientObserver;
8
9
class OauthClient extends Client
10
{
11
    protected $dates    = ['created_at', 'updated_at'];
12
    protected $fillable = ['name', 'redirect', 'user_id', 'personal_access_client', 'password_client', 'revoked'];
13
    
14
    public function user()
15
    {
16
        return $this->belongsTo(AclUser::class);
17
    }
18
    
19
    public static function boot()
20
    {
21
        parent::boot();
22
        OauthClient::observe(OauthClientObserver::class);
23
    }
24
}
25