Test Failed
Push — feature/job-builder/update-job... ( 68ba7e...7a08dc )
by Xander
23:02 queued 10:32
created

Department   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 3
eloc 12
c 2
b 0
f 0
dl 0
loc 31
ccs 0
cts 6
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A department_translations() 0 3 1
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
12
use Backpack\CRUD\CrudTrait;
13
use Backpack\CRUD\ModelTraits\SpatieTranslatable\HasTranslations;
14
15
/**
16
 * Class Department
17
 * @property int $id
18
 * @property string $name
19
 * @property string $impact
20
 *
21
 * @property \Jenssegers\Date\Date $created_at
22
 * @property \Jenssegers\Date\Date $updated_at
23
 *
24
 * @property \Illuminate\Database\Eloquent\Collection $managers
25
 * @property \Illuminate\Database\Eloquent\Collection $job_posters
26
 *
27
 * Localized Properties:
28
 * @property string $name
29
 * @property string $impact
30
 */
31
class Department extends BaseModel
32
{
33
    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...
34
    use HasTranslations;
35
36
    /**
37
     * @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...
38
     * */
39
    public $translatable = [
40
        'name',
41
        'impact',
42
    ];
43
44
    protected $fillable = [
1 ignored issue
show
introduced by
Property \App\Models\Lookup\Department::$fillable does not have @var annotation.
Loading history...
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
45
        'name',
46
        'impact',
47
    ];
48
49
    public function managers() // phpcs:ignore
50
    {
51
        return $this->hasMany(\App\Models\Manager::class);
52
    }
53
54
    public function department_translations() // phpcs:ignore
55
    {
56
        return $this->hasMany(\App\Models\Lookup\DepartmentTranslation::class);
57
    }
58
59
    public function job_posters() // phpcs:ignore
60
    {
61
        return $this->hasMany(\App\Models\JobPoster::class);
62
    }
63
}
64