Passed
Push — task/laravel-breadcrumbs ( 3beccb...a96280 )
by Yonathan
10:46 queued 10s
created

Project::projectable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * Created by Reliese Model.
5
 * Date: Thu, 12 Jul 2018 22:39:28 +0000.
6
 */
7
8
namespace App\Models;
9
10
/**
11
 * Class Project
12
 *
13
 * @property int $id
14
 * @property string $name
15
 * @property \Jenssegers\Date\Date $start_date
16
 * @property \Jenssegers\Date\Date $end_date
17
 * @property int $projectable_id
18
 *
19
 * @property \Jenssegers\Date\Date $created_at
20
 * @property \Jenssegers\Date\Date $updated_at
21
 *
22
 * @property \App\Models\Applicant|\App\Models\JobApplication $projectable
23
 */
24
class Project extends BaseModel
25
{
26
27
    protected $casts = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
28
        'name' => 'string',
29
        'start_date' => 'date',
30
        'end_date' => 'date',
31
        'projectable_id' => 'int'
32
    ];
33
    protected $fillable = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
34
        'name',
35
        'start_date',
36
        'end_date'
37
    ];
38
39
    public function references()
2 ignored issues
show
Coding Style Documentation introduced by
Missing doc comment for function references()
Loading history...
introduced by
Method \App\Models\Project::references() does not have return type hint nor @return annotation for its return value.
Loading history...
40
    {
41
        return $this->belongsToMany(\App\Models\Reference::class);
42
    }
43
44
    public function projectable()
2 ignored issues
show
introduced by
Method \App\Models\Project::projectable() does not have return type hint nor @return annotation for its return value.
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function projectable()
Loading history...
45
    {
46
        return $this->morphTo();
47
    }
48
}
49