UserRole   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 22
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A users() 0 3 1
1
<?php
2
3
/**
4
 * Created by Reliese Model.
5
 * Date: Thu, 12 Jul 2018 22:39:28 +0000.
6
 */
7
8
namespace App\Models;
9
10
use Backpack\CRUD\app\Models\Traits\CrudTrait;
11
use Backpack\CRUD\app\Models\Traits\SpatieTranslatable\HasTranslations;
12
13
/**
14
 * Class UserRole
15
 *
16
 * @property int $id
17
 * @property string $key
18
 * @property string $name
19
 * @property \Jenssegers\Date\Date $created_at
20
 * @property \Jenssegers\Date\Date $updated_at
21
 * @property \Illuminate\Database\Eloquent\Collection $users
22
 */
23
class UserRole extends BaseModel
24
{
25
    use CrudTrait;
26
    use HasTranslations;
27
28
    /**
29
     * @var $fillable string[]
0 ignored issues
show
Documentation Bug introduced by
The doc comment $fillable at position 0 could not be parsed: Unknown type name '$fillable' at position 0 in $fillable.
Loading history...
30
     */
31
    protected $fillable = [
32
        'name'
33
    ];
34
35
    /**
36
     * @var $translatable string[]
0 ignored issues
show
Documentation Bug introduced by
The doc comment $translatable at position 0 could not be parsed: Unknown type name '$translatable' at position 0 in $translatable.
Loading history...
37
     */
38
    public $translatable = [
39
        'name'
40
    ];
41
42
    public function users() // phpcs:ignore
43
    {
44
        return $this->hasMany(\App\Models\User::class);
45
    }
46
}
47