Passed
Push — task/common-translation-packag... ( 0de03f...12df17 )
by Grant
08:22 queued 11s
created

Degree::degreeable()   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
use App\Models\Applicant;
11
12
/**
13
 * Class Degree
14
 *
15
 * @property int $id
16
 * @property int $degree_type_id
17
 * @property string $area_of_study
18
 * @property string $institution
19
 * @property string $thesis
20
 * @property \Jenssegers\Date\Date $start_date
21
 * @property \Jenssegers\Date\Date $end_date
22
 * @property int $degreeable_id
23
 * @property string $degreeable_type
24
 * @property string $blockcert_url
25
 *
26
 * @property \Jenssegers\Date\Date $created_at
27
 * @property \Jenssegers\Date\Date $updated_at
28
 *
29
 * @property \App\Models\Lookup\DegreeType $degree_type
30
 * @property \App\Models\Applicant|\App\Models\JobApplication $degreeable
31
 */
32
class Degree extends BaseModel
33
{
34
35
    protected $casts = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
36
        'degree_type_id' => 'int',
37
        'area_of_study' => 'string',
38
        'institution' => 'string',
39
        'thesis' => 'string',
40
        'start_date' => 'date',
41
        'end_date' => 'date',
42
        'blockcert_url' => 'string',
43
    ];
44
    protected $fillable = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
45
        'degree_type_id',
46
        'area_of_study',
47
        'institution',
48
        'thesis',
49
        'start_date',
50
        'end_date',
51
        'blockcert_url',
52
    ];
53
54
    public function degree_type()
2 ignored issues
show
Coding Style Documentation introduced by
Missing doc comment for function degree_type()
Loading history...
Coding Style introduced by
Method name "Degree::degree_type" is not in camel caps format
Loading history...
introduced by
Method \App\Models\Degree::degree_type() does not have return type hint nor @return annotation for its return value.
Loading history...
55
    {
56
        return $this->belongsTo(\App\Models\Lookup\DegreeType::class);
57
    }
58
59
    public function degreeable()
2 ignored issues
show
Coding Style Documentation introduced by
Missing doc comment for function degreeable()
Loading history...
introduced by
Method \App\Models\Degree::degreeable() does not have return type hint nor @return annotation for its return value.
Loading history...
60
    {
61
        return $this->morphTo();
62
    }
63
}
64