Passed
Push — feature/screening-plan ( a30cac...87436a )
by Tristan
07:23
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 Illuminate\Database\Eloquent\Model;
6
use App\Models\JobPoster;
7
use App\Models\Assessment;
8
9
/**
10
 * Class ScreeningPlan
11
 *
12
 * @property int $id
13
 * @property int $job_poster_id
14
 * @property int $version
15
 * @property \Jenssegers\Date\Date $created_at
16
 * @property \Jenssegers\Date\Date $updated_at
17
 *
18
 * @property JobPoster $job_poster
19
 * @property Collection[Assessment] $assessments
20
 */
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...
21
class ScreeningPlan extends BaseModel
22
{
23
    /**
24
     * The columns that can be filled with mass-assignment
25
     *
26
     * @var string[]
27
     */
28
    protected $fillable = [];
29
30
    /**
31
     * Get the JobPoster this plan belongs to.
32
     *
33
     * @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...
34
     */
35
    public function job_poster() // phpcs:ignore
36
    {
37
        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...
38
    }
39
40
    /**
41
     * Get the collection of Assessments that make up this plan.
42
     *
43
     * @return \Illuminate\Database\Eloquent\Collection
44
     */
45
    public function assessments() // phpcs:ignore
46
    {
47
        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...
48
    }
49
}
50