Total Complexity | 11 |
Total Lines | 69 |
Duplicated Lines | 0 % |
Coverage | 27.27% |
Changes | 0 |
1 | <?php |
||
38 | class Applicant extends BaseModel |
||
39 | { |
||
40 | |||
41 | protected $casts = [ |
||
1 ignored issue
–
show
|
|||
42 | 'user_id' => 'int', |
||
43 | 'personal_website' => 'string', |
||
44 | 'tagline' => 'string', |
||
45 | 'twitter_username' => 'string', |
||
46 | 'linkedin_url' => 'string', |
||
47 | 'is_snapshot' => 'boolean' |
||
48 | ]; |
||
49 | protected $fillable = [ |
||
1 ignored issue
–
show
|
|||
50 | 'personal_website', |
||
51 | 'tagline', |
||
52 | 'twitter_username', |
||
53 | 'linkedin_url' |
||
54 | ]; |
||
55 | |||
56 | 25 | public function user() |
|
1 ignored issue
–
show
|
|||
57 | { |
||
58 | 25 | return $this->belongsTo(\App\Models\User::class); |
|
59 | } |
||
60 | |||
61 | public function applicant_profile_answers() |
||
1 ignored issue
–
show
|
|||
62 | { |
||
63 | return $this->hasMany(\App\Models\ApplicantProfileAnswer::class); |
||
64 | } |
||
65 | |||
66 | public function job_applications() |
||
1 ignored issue
–
show
|
|||
67 | { |
||
68 | if ($this->is_snapshot) { |
||
69 | return $this->hasMany(\App\Models\JobApplication::class, 'applicant_snapshot_id'); |
||
70 | } |
||
71 | return $this->hasMany(\App\Models\JobApplication::class); |
||
72 | } |
||
73 | |||
74 | public function degrees() |
||
1 ignored issue
–
show
|
|||
75 | { |
||
76 | return $this->hasMany(\App\Models\Degree::class)->orderBy('end_date', 'desc'); |
||
77 | } |
||
78 | |||
79 | public function courses() |
||
1 ignored issue
–
show
|
|||
80 | { |
||
81 | return $this->hasMany(\App\Models\Course::class)->orderBy('end_date', 'desc'); |
||
82 | } |
||
83 | |||
84 | public function work_experiences() |
||
1 ignored issue
–
show
|
|||
85 | { |
||
86 | return $this->hasMany(\App\Models\WorkExperience::class)->orderBy('end_date', 'desc'); |
||
87 | } |
||
88 | |||
89 | 2 | public function skill_declarations() |
|
1 ignored issue
–
show
|
|||
90 | { |
||
91 | 2 | return $this->hasMany(\App\Models\SkillDeclaration::class); |
|
92 | } |
||
93 | |||
94 | 1 | public function references() |
|
1 ignored issue
–
show
|
|||
95 | { |
||
96 | 1 | return $this->hasMany(\App\Models\Reference::class); |
|
97 | } |
||
98 | |||
99 | public function work_samples() |
||
102 | } |
||
103 | |||
104 | public function projects() |
||
107 | } |
||
108 | } |
||
109 |