Passed
Push — feature/job-builder/step-03-ui ( dabf2e...dabf2e )
by Xander
20:05 queued 13s
created

RatingGuideQuestion::rating_guide_answers()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
namespace App\Models;
4
5
/**
6
 * Class RatingGuideQuestion
7
 *
8
 * @property int $id
9
 * @property int $job_poster_id
10
 * @property int $assessment_type_id
11
 * @property string $question
12
 * @property \Jenssegers\Date\Date $created_at
13
 * @property \Jenssegers\Date\Date $updated_at
14
 *
15
 * @property \App\Models\JobPoster $job_poster
16
 * @property \App\Models\Lookup\AssessmentType $assessment_type
17
 * @property \Illuminate\Database\Eloquent\Collection $rating_guide_answers
18
 */
19
class RatingGuideQuestion extends BaseModel
20
{
21
    /**
22
     * The columns that can be filled with mass-assignment
23
     *
24
     * @var string[]
25
     */
26
    protected $fillable = [
27
        'job_poster_id',
28
        'assessment_type_id',
29
        'question'
30
    ];
31
32
    /**
33
     * Get the JobPoster relation.
34
     *
35
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
36
     */
37
    public function job_poster(): \Illuminate\Database\Eloquent\Relations\BelongsTo
0 ignored issues
show
Coding Style introduced by
Method name "RatingGuideQuestion::job_poster" is not in camel caps format
Loading history...
38
    {
39
        return $this->belongsTo(\App\Models\JobPoster::class);
40
    }
41
42
    /**
43
     * Get the AssessmentType relation.
44
     *
45
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
46
     */
47
    public function assessment_type(): \Illuminate\Database\Eloquent\Relations\BelongsTo
0 ignored issues
show
Coding Style introduced by
Method name "RatingGuideQuestion::assessment_type" is not in camel caps format
Loading history...
48
    {
49
        return $this->belongsTo(\App\Models\Lookup\AssessmentType::class);
50
    }
51
52
    /**
53
     * Get the RatingGuideAnswers relation.
54
     *
55
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
56
     */
57
    public function rating_guide_answers(): \Illuminate\Database\Eloquent\Relations\HasMany
0 ignored issues
show
Coding Style introduced by
Method name "RatingGuideQuestion::rating_guide_answers" is not in camel caps format
Loading history...
58
    {
59
        return $this->hasMany(\App\Models\RatingGuideAnswer::class);
60
    }
61
}
62