Completed
Pull Request — master (#23)
by ARCANEDEV
09:06
created

PermissionRole   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getObserverClass() 0 4 1
1
<?php namespace Arcanedev\LaravelAuth\Models\Pivots;
2
3
/**
4
 * Class     PermissionRole
5
 *
6
 * @package  Arcanedev\LaravelAuth\Models\Pivots
7
 * @author   ARCANEDEV <[email protected]>
8
 *
9
 * @property  int             permission_id
10
 * @property  int             role_id
11
 * @property  \Carbon\Carbon  created_at
12
 * @property  \Carbon\Carbon  updated_at
13
 */
14
class PermissionRole extends AbstractPivot
15
{
16
    /* -----------------------------------------------------------------
17
     |  Properties
18
     | -----------------------------------------------------------------
19
     */
20
    /**
21
     * The attributes that should be cast to native types.
22
     *
23
     * @var array
24
     */
25
    protected $casts = [
26
        'permission_id' => 'integer',
27
        'role_id'       => 'integer',
28
    ];
29
30
    /* -----------------------------------------------------------------
31
     |  Getters & Setters
32
     | -----------------------------------------------------------------
33
     */
34
    /**
35
     * Get the observer class for the pivot table.
36
     *
37
     * @return string|null
38
     */
39
    protected function getObserverClass()
40
    {
41
        return config('laravel-auth.permission-role.observer');
42
    }
43
}
44