Passed
Push — feature/screening-plan ( a30cac...87436a )
by Tristan
07:23
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
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
use Jenssegers\Date\Date;
7
use App\Models\ScreeningPlan;
8
use App\Models\Criteria;
9
use App\Models\Lookup\AssessmentType;
10
11
/**
12
 * Class Assessment
13
 *
14
 * @property int $id
15
 * @property int $screening_plan_id
16
 * @property int $criterion_id
17
 * @property int $assessment_type_id
18
 * @property \Jenssegers\Date\Date $created_at
19
 * @property \Jenssegers\Date\Date $updated_at
20
 *
21
 * @property \App\Models\ScreeningPlan $screening_plan
22
 * @property \App\Models\Criteria $criterion
23
 * @property \App\Models\Lookup\AssessmentType $assessment_type
24
 */
0 ignored issues
show
Coding Style introduced by
Missing @category tag in class comment
Loading history...
Coding Style introduced by
Missing @package tag in class comment
Loading history...
Coding Style introduced by
Missing @author tag in class comment
Loading history...
Coding Style introduced by
Missing @license tag in class comment
Loading history...
Coding Style introduced by
Missing @link tag in class comment
Loading history...
25
class Assessment extends Model
26
{
27
    /**
28
     * The columns that can be filled with mass-assignment
29
     *
30
     * @var string[]
31
     */
32
    protected $fillable = [];
33
34
    /**
35
     * Get the ScreeningPlan this assessment is part of.
36
     *
37
     * @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...
38
     */
39
    public function screening_plan() // phpcs:ignore
40
    {
41
        return $this->belongsTo(ScreeningPlan::class);
1 ignored issue
show
Bug Best Practice introduced by
The expression return $this->belongsTo(...s\ScreeningPlan::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...
42
    }
43
44
    /**
45
     * Get the single Criteria object this assessment applies to.
46
     *
47
     * @return Illuminate\Database\Eloquent\Relations\Relation
48
     */
49
    public function criterion() // phpcs:ignore
50
    {
51
        return $this->belongsTo(Criteria::class);
1 ignored issue
show
Bug Best Practice introduced by
The expression return $this->belongsTo(...Models\Criteria::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...
52
    }
53
54
    /**
55
     * Get the AssessmentType of this Assessment.
56
     *
57
     * @return Illuminate\Database\Eloquent\Relations\Relation
58
     */
59
    public function assessment_type() // phpcs:ignore
60
    {
61
        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...
62
    }
63
}
64