Permission   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 1
dl 0
loc 27
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
1
<?php
2
3
namespace EmilMoe\Guardian\Http\Models;
4
5
use EmilMoe\Guardian\Support\Guardian;
6
use Illuminate\Database\Eloquent\Model;
7
8
class Permission extends Model
9
{
10
    /**
11
     * The table associated with the model.
12
     *
13
     * @var string
14
     */
15
    protected $table;
16
17
    /**
18
     * The attributes that are mass assignable.
19
     *
20
     * @var array
21
     */
22
    protected $fillable = ['name'];
23
24
    /**
25
     * Create a new Permission model instance.
26
     *
27
     * @param array $attributes
28
     */
29
    public function __construct(array $attributes = [])
30
    {
31
        $this->table = Guardian::getPermissionTable();
32
        parent::__construct($attributes);
33
    }
34
}