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

ExperienceWork   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
eloc 19
c 1
b 0
f 1
dl 0
loc 27
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A experienceable() 0 3 1
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