Passed
Push — task/all-applications-to-pdf ( cb7375...852a46 )
by Tristan
59:34 queued 50:51
created

Assessment::screening_plan()   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
use Jenssegers\Date\Date;
6
use App\Models\Criteria;
7
use App\Models\Lookup\AssessmentType;
8
9
/**
10
 * Class Assessment
11
 *
12
 * @property int $id
13
 * @property int $criterion_id
14
 * @property int $assessment_type_id
15
 * @property \Jenssegers\Date\Date $created_at
16
 * @property \Jenssegers\Date\Date $updated_at
17
 *
18
 * @property \App\Models\Criteria $criterion
19
 * @property \App\Models\Lookup\AssessmentType $assessment_type
20
 */
21
class Assessment extends BaseModel
22
{
23
    /**
24
     * The columns that can be filled with mass-assignment
25
     *
26
     * @var string[]
27
     */
28
    protected $fillable = [
29
        'criterion_id',
30
        'assessment_type_id'
31
    ];
32
33
    /**
34
     * Get the single Criteria object this assessment applies to.
35
     *
36
     * @return Illuminate\Database\Eloquent\Relations\Relation
0 ignored issues
show
Bug introduced by
The type App\Models\Illuminate\Da...uent\Relations\Relation was not found. Did you mean Illuminate\Database\Eloquent\Relations\Relation? If so, make sure to prefix the type with \.
Loading history...
37
     */
38
    public function criterion() // phpcs:ignore
39
    {
40
        return $this->belongsTo(Criteria::class, 'criterion_id');
1 ignored issue
show
Bug Best Practice introduced by
The expression return $this->belongsTo(...:class, 'criterion_id') returns the type Illuminate\Database\Eloquent\Relations\BelongsTo which is incompatible with the documented return type App\Models\Illuminate\Da...uent\Relations\Relation.
Loading history...
41
    }
42
43
    /**
44
     * Get the AssessmentType of this Assessment.
45
     *
46
     * @return Illuminate\Database\Eloquent\Relations\Relation
47
     */
48
    public function assessment_type() // phpcs:ignore
49
    {
50
        return $this->belongsTo(AssessmentType::class);
1 ignored issue
show
Bug Best Practice introduced by
The expression return $this->belongsTo(...\AssessmentType::class) returns the type Illuminate\Database\Eloquent\Relations\BelongsTo which is incompatible with the documented return type App\Models\Illuminate\Da...uent\Relations\Relation.
Loading history...
51
    }
52
}
53