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

ScreeningPlan::job_poster()   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 App\Models\JobPoster;
6
use App\Models\Assessment;
7
8
/**
9
 * Class ScreeningPlan
10
 *
11
 * @property int $id
12
 * @property int $job_poster_id
13
 * @property int $version
14
 * @property \Jenssegers\Date\Date $created_at
15
 * @property \Jenssegers\Date\Date $updated_at
16
 *
17
 * @property JobPoster $job_poster
18
 * @property Collection[Assessment] $assessments
19
 */
0 ignored issues
show
Documentation Bug introduced by
The doc comment Collection[Assessment] at position 1 could not be parsed: Expected ']' at position 1, but found '['.
Loading history...
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...
20
class ScreeningPlan extends BaseModel
21
{
22
    /**
23
     * The columns that can be filled with mass-assignment
24
     *
25
     * @var string[]
26
     */
27
    protected $fillable = [];
28
29
    /**
30
     * Get the JobPoster this plan belongs to.
31
     *
32
     * @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...
33
     */
34
    public function job_poster() // phpcs:ignore
35
    {
36
        return $this->belongsTo(JobPoster::class);
1 ignored issue
show
Bug Best Practice introduced by
The expression return $this->belongsTo(...odels\JobPoster::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...
37
    }
38
39
    /**
40
     * Get the collection of Assessments that make up this plan.
41
     *
42
     * @return \Illuminate\Database\Eloquent\Collection
43
     */
44
    public function assessments() // phpcs:ignore
45
    {
46
        return $this->hasMany(Assessment::class);
1 ignored issue
show
Bug Best Practice introduced by
The expression return $this->hasMany(Ap...dels\Assessment::class) returns the type Illuminate\Database\Eloquent\Relations\HasMany which is incompatible with the documented return type Illuminate\Database\Eloquent\Collection.
Loading history...
47
    }
48
}
49