Passed
Push — task/experience-education ( 788037 )
by Grant
05:48
created

ExperienceWork::experienceable()   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
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace App\Models;
4
5
use App\Models\BaseModel;
6
7
/**
8
 * Class ExperienceWork
9
 *
10
 * @property int $id
11
 * @property string $title
12
 * @property string $organization
13
 * @property string $group
14
 * @property boolean $is_active
15
 * @property \Jenssegers\Date\Date $start_date
16
 * @property \Jenssegers\Date\Date $end_date
17
 * @property int $experienceable_id
18
 * @property string $experienceable_type
19
 * @property boolean $is_education_requirement
20
 * @property \Jenssegers\Date\Date $created_at
21
 * @property \Jenssegers\Date\Date $updated_at
22
 *
23
 * @property \App\Models\Applicant|\App\Models\JobApplication $experienceable
24
 */
25
class ExperienceWork extends BaseModel
26
{
27
    protected $casts = [
28
        'title' => 'string',
29
        'organization' => 'string',
30
        'group' => 'string',
31
        'is_active' => 'boolean',
32
        'start_date' => 'date',
33
        'end_date' => 'date',
34
        'is_education_requirement' => 'boolean'
35
    ];
36
37
    protected $fillable = [
38
        'title',
39
        'organization',
40
        'group',
41
        'is_active',
42
        'start_date',
43
        'end_date',
44
        'is_education_requirement'
45
    ];
46
47
    protected $table = ['experiences_work'];
48
49
    public function experienceable() //phpcs:ignore
50
    {
51
        return $this->morphTo();
52
    }
53
}
54