Completed
Push — feature/default-questions-for-... ( 71cb2f...4b5016 )
by Chris
14:16 queued 06:35
created

Assessment   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
eloc 5
dl 0
loc 37
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A criterion() 0 3 1
A screening_plan() 0 3 1
A assessment_type() 0 3 1
1
<?php
2
0 ignored issues
show
Coding Style introduced by
Missing file doc comment
Loading history...
3
namespace App\Models;
4
5
use Jenssegers\Date\Date;
6
use App\Models\ScreeningPlan;
7
use App\Models\Criteria;
8
use App\Models\Lookup\AssessmentType;
9
10
/**
11
 * Class Assessment
12
 *
13
 * @property int $id
14
 * @property int $screening_plan_id
15
 * @property int $criterion_id
16
 * @property int $assessment_type_id
17
 * @property \Jenssegers\Date\Date $created_at
18
 * @property \Jenssegers\Date\Date $updated_at
19
 *
20
 * @property \App\Models\ScreeningPlan $screening_plan
21
 * @property \App\Models\Criteria $criterion
22
 * @property \App\Models\Lookup\AssessmentType $assessment_type
23
 */
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...
24
class Assessment extends BaseModel
25
{
26
    /**
27
     * The columns that can be filled with mass-assignment
28
     *
29
     * @var string[]
30
     */
31
    protected $fillable = [];
32
33
    /**
34
     * Get the ScreeningPlan this assessment is part of.
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 screening_plan() // phpcs:ignore
39
    {
40
        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...
41
    }
42
43
    /**
44
     * Get the single Criteria object this assessment applies to.
45
     *
46
     * @return Illuminate\Database\Eloquent\Relations\Relation
47
     */
48
    public function criterion() // phpcs:ignore
49
    {
50
        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...
51
    }
52
53
    /**
54
     * Get the AssessmentType of this Assessment.
55
     *
56
     * @return Illuminate\Database\Eloquent\Relations\Relation
57
     */
58
    public function assessment_type() // phpcs:ignore
59
    {
60
        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...
61
    }
62
}
63