Completed
Push — task/accessibility-audit-fixes ( 1e0e3b )
by Grant
22s queued 11s
created

SkillDeclaration::skill()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
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
/**
11
 * Class SkillDeclaration
12
 *
13
 * @property int $id
14
 * @property int $skill_id
15
 * @property int $skill_status_id
16
 * @property int $skill_level_id
17
 * @property int $applicant_id
18
 * @property string $description
19
 * @property \Jenssegers\Date\Date $created_at
20
 * @property \Jenssegers\Date\Date $updated_at
21
 *
22
 * @property \App\Models\Skill $skill
23
 * @property \App\Models\Lookup\SkillStatus $skill_status
24
 * @property \App\Models\Lookup\SkillLevel $skill_level
25
 * @property \App\Models\Applicant $applicant
26
 * @property \Illuminate\Database\Eloquent\Collection $references
27
 * @property \Illuminate\Database\Eloquent\Collection $work_samples
28
 */
29
class SkillDeclaration extends BaseModel
30
{
31
32
    /**
33
     * @var string[]
34
     */
35
    protected $casts = [
36
        'skill_id' => 'int',
37
        'skill_status_id' => 'int',
38
        'skill_level_id' => 'int',
39
        'applicant_id' => 'int',
40
        'description' => 'string'
41
    ];
42
43
    /**
44
     * @var string[]
45
     */
46
    protected $fillable = [
47
        'description',
48
        'skill_level_id'
49
    ];
50
51
    public function skill()// phpcs:ignore
52
    {
53
        return $this->belongsTo(\App\Models\Skill::class);
54
    }
55
56
    public function skill_status()// phpcs:ignore
57
    {
58
        return $this->belongsTo(\App\Models\Lookup\SkillStatus::class);
59
    }
60
61
    public function skill_level()// phpcs:ignore
62
    {
63
        return $this->belongsTo(\App\Models\Lookup\SkillLevel::class);
64
    }
65
66 1
    public function applicant()// phpcs:ignore
67
    {
68 1
        return $this->belongsTo(\App\Models\Applicant::class);
69
    }
70
71 1
    public function references()// phpcs:ignore
72
    {
73 1
        return $this->belongsToMany(\App\Models\Reference::class);
74
    }
75
76 1
    public function work_samples()// phpcs:ignore
77
    {
78 1
        return $this->belongsToMany(\App\Models\WorkSample::class);
79
    }
80
}
81