Passed
Push — feature/application-review-ui ( afbf92...be3688 )
by Chris
04:21
created

ExperienceSkill::skills()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Models;
4
5
use App\Models\BaseModel;
6
7
/**
8
 * Class ExperienceSkill
9
 *
10
 * @property int $skill_id
11
 * @property int $experience_id
12
 * @property string $experience_type
13
 * @property string $justification
14
 * @property \Jenssegers\Date\Date $created_at
15
 * @property \Jenssegers\Date\Date $updated_at
16
 *
17
 * @property \Illuminate\Database\Eloquent\Collection $skill
18
 * @property \App\Models\ExperienceAward|\App\Models\ExperienceCommunity|\App\Models\ExperienceEducation|\App\Models\ExperiencePersonal|\App\Models\ExperienceWork $experience
19
 */
20
class ExperienceSkill extends BaseModel
21
{
22
    protected $casts = [
23
        'skill_id' => 'int',
24
        'experience_id' => 'int',
25
        'experience_type' => 'string',
26
        'justification' => 'string',
27
    ];
28
29
    protected $fillable = [
30
        'justification'
31
    ];
32
33
    public function skill()
34
    {
35
        return $this->belongsTo(\App\Models\Skill::class);
36
    }
37
38
    public function experience()
39
    {
40
        return $this->morphTo();
41
    }
42
}
43