JobPosterQuestion   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 12
dl 0
loc 24
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A job_poster() 0 3 1
A job_application_answers() 0 3 1
1
<?php
2
3
namespace App\Models;
4
5
use App\Models\BaseModel;
6
use Spatie\Translatable\HasTranslations;
7
8
/**
9
 * Class JobPosterQuestion
10
 *
11
 * @property int $id
12
 * @property int $job_poster_id
13
 * @property \Jenssegers\Date\Date $created_at
14
 * @property \Jenssegers\Date\Date $updated_at
15
 *
16
 * @property \App\Models\JobPoster $job_poster
17
 * @property \Illuminate\Database\Eloquent\Collection $job_application_answers
18
 *
19
 * Localized Properties:
20
 * @property string $question
21
 * @property string $description
22
 */
23
class JobPosterQuestion extends BaseModel
24
{
25
    use HasTranslations;
26
27
    public $translatable = [
28
        'question',
29
        'description'
30
    ];
31
    protected $fillable = [
32
        'question',
33
        'description'
34
    ];
35
    protected $casts = [
36
        'job_poster_id' => 'int'
37
    ];
38
39
    public function job_poster() //phpcs:ignore
40
    {
41
        return $this->belongsTo(\App\Models\JobPoster::class);
42
    }
43
44
    public function job_application_answers() //phpcs:ignore
45
    {
46
        return $this->hasMany(\App\Models\JobApplicationAnswer::class, 'job_poster_questions_id');
47
    }
48
}
49