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

Course   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A course_status() 0 2 1
A applicant() 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 string $name
16
 * @property string $institution
17
 * @property int $course_status_id
18
 * @property \Jenssegers\Date\Date $start_date
19
 * @property \Jenssegers\Date\Date $end_date
20
 * @property int $applicant_id
21
 *
22
 * @property \Jenssegers\Date\Date $created_at
23
 * @property \Jenssegers\Date\Date $updated_at
24
 *
25
 * @property \App\Models\Lookup\CourseStatus $course_status
26
 * @property \App\Models\Applicant $applicant
27
 */
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...
28
class Course 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...
29
30
    protected $casts = [
31
        'name' => 'string',
32
        'institution' => 'string',
33
        'course_status_id' => 'int',
34
        'start_date' => 'date',
35
        'end_date' => 'date',
36
        'appliant_id' => 'int'
37
    ];
38
    protected $fillable = [
39
        'name',
40
        'institution',
41
        'course_status_id',
42
        'start_date',
43
        'end_date'
44
    ];
45
46
    public function course_status() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function course_status()
Loading history...
Coding Style introduced by
Public method name "Course::course_status" is not in camel caps format
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
47
        return $this->belongsTo(\App\Models\Lookup\CourseStatus::class);
48
    }
49
50
    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...
51
        return $this->belongsTo(\App\Models\Applicant::class);
52
    }
53
}
54