Passed
Push — feature/job-builder/job-detail... ( 58ee17...46caa1 )
by Xander
23:02 queued 12:47
created

Department   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 12
dl 0
loc 31
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A job_posters() 0 3 1
A managers() 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
use Backpack\CRUD\CrudTrait;
12
use Backpack\CRUD\ModelTraits\SpatieTranslatable\HasTranslations;
13
14
/**
15
 * Class Department
16
 * @property int $id
17
 * @property string $name
18
 * @property string $impact
19
 *
20
 * @property \Jenssegers\Date\Date $created_at
21
 * @property \Jenssegers\Date\Date $updated_at
22
 * @property \Illuminate\Database\Eloquent\Collection $managers
23
 * @property \Illuminate\Database\Eloquent\Collection $job_posters
24
 */
25
class Department extends BaseModel
26
{
27
28
    use CrudTrait;
0 ignored issues
show
introduced by
The trait Backpack\CRUD\CrudTrait requires some properties which are not provided by App\Models\Lookup\Department: $Type, $fakeColumns
Loading history...
29
    use HasTranslations;
30
31
    /**
32
     * @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...
33
     */
34
    protected $fillable = [
35
        'id',
36
        'name',
37
        'impact'
38
    ];
39
40
     /**
41
     * @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...
42
     */
43
    public $translatable = [
44
        'name',
45
        'impact'
46
    ];
47
48
    public function managers() // phpcs:ignore
49
    {
50
        return $this->hasMany(\App\Models\Manager::class);
51
    }
52
53
    public function job_posters() // phpcs:ignore
54
    {
55
        return $this->hasMany(\App\Models\JobPoster::class);
56
    }
57
}
58