Department   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 16
dl 0
loc 34
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A job_posters() 0 3 1
A users() 0 3 1
1
<?php
2
3
/**
4
 * Created by Reliese Model.
5
 * Date: Thu, 12 Jul 2018 22:39:27 +0000.
6
 */
7
8
namespace App\Models\Lookup;
9
10
use App\Models\BaseModel;
11
12
use Backpack\CRUD\app\Models\Traits\CrudTrait;
13
use Backpack\CRUD\app\Models\Traits\SpatieTranslatable\HasTranslations;
14
15
/**
16
 * Class Department
17
 * @property int $id
18
 * @property int $parent_id
19
 * @property int $lft
20
 * @property int $rgt
21
 * @property int $depth
22
 * @property string $name
23
 * @property string $impact
24
 * @property string $preference
25
 * @property string $allow_indeterminate
26
 * @property string $is_partner
27
 * @property string $is_host
28
 *
29
 * @property \Jenssegers\Date\Date $created_at
30
 * @property \Jenssegers\Date\Date $updated_at
31
 *
32
 * @property \Illuminate\Database\Eloquent\Collection $job_posters
33
 * @property \Illuminate\Database\Eloquent\Collection $users
34
 *
35
 * Localized Properties:
36
 * @property string $name
37
 * @property string $impact
38
 * @property string $preference
39
 */
40
class Department extends BaseModel
41
{
42
    use CrudTrait;
43
    use HasTranslations;
44
45
    /**
46
     * @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...
47
     * */
48
    public $translatable = [
49
        'name',
50
        'impact',
51
        'preference',
52
    ];
53
54
    /**
55
     * @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...
56
     * */
57
    protected $fillable = [
58
        'name',
59
        'impact',
60
        'preference',
61
        'allow_indeterminate',
62
        'is_partner',
63
        'is_host',
64
    ];
65
66
    public function users() // phpcs:ignore
67
    {
68
        return $this->hasMany(\App\Models\User::class);
69
    }
70
71
    public function job_posters() // phpcs:ignore
72
    {
73
        return $this->hasMany(\App\Models\JobPoster::class);
74
    }
75
}
76