Passed
Pull Request — dev (#313)
by Tristan
06:51
created

Degree   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
eloc 18
dl 0
loc 26
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A applicant() 0 2 1
A degree_type() 0 2 1
1
<?php
2
3
/**
4
 * Created by Reliese Model.
5
 * Date: Thu, 12 Jul 2018 22:39:28 +0000.
6
 */
0 ignored issues
show
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @package tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
Coding Style introduced by
Missing @license tag in file comment
Loading history...
Coding Style introduced by
Missing @link tag in file comment
Loading history...
7
8
namespace App\Models;
9
use App\Models\Applicant;
10
11
/**
12
 * Class Degree
13
 *
14
 * @property int $id
15
 * @property int $degree_type_id
16
 * @property string $area_of_study
17
 * @property string $institution
18
 * @property string $thesis
19
 * @property \Jenssegers\Date\Date $start_date
20
 * @property \Jenssegers\Date\Date $end_date
21
 * @property int $applicant_id
22
 *
23
 * @property \Jenssegers\Date\Date $created_at
24
 * @property \Jenssegers\Date\Date $updated_at
25
 *
26
 * @property \App\Models\Lookup\DegreeType $degree_type
27
 * @property \App\Models\Applicant $applicant
28
 */
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...
29
class Degree extends BaseModel {
0 ignored issues
show
Coding Style introduced by
Opening brace of a class must be on the line after the definition
Loading history...
30
31
    protected $casts = [
32
        'degree_type_id' => 'int',
33
        'area_of_study' => 'string',
34
        'institution' => 'string',
35
        'thesis' => 'string',
36
        'start_date' => 'date',
37
        'end_date' => 'date',
38
        'appliant_id' => 'int'
39
    ];
40
    protected $fillable = [
41
        'degree_type_id',
42
        'area_of_study',
43
        'institution',
44
        'thesis',
45
        'start_date',
46
        'end_date'
47
    ];
48
49
    public function degree_type() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function degree_type()
Loading history...
Coding Style introduced by
Public method name "Degree::degree_type" is not in camel caps format
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
50
        return $this->belongsTo(\App\Models\Lookup\DegreeType::class);
51
    }
52
53
    public function applicant() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function applicant()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
54
        return $this->belongsTo(\App\Models\Applicant::class);
55
    }
56
}
57