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

Course   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 15
dl 0
loc 26
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A courseable() 0 3 1
A course_status() 0 3 1
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 Course
12
 *
13
 * @property int $id
14
 * @property string $name
15
 * @property string $institution
16
 * @property int $course_status_id
17
 * @property \Jenssegers\Date\Date $start_date
18
 * @property \Jenssegers\Date\Date $end_date
19
 * @property int $courseable_id
20
 * @property string $courseable_type
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|\App\Models\JobApplication $courseable
27
 */
28
class Course extends BaseModel
29
{
30
31
    protected $casts = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
32
        'name' => 'string',
33
        'institution' => 'string',
34
        'course_status_id' => 'int',
35
        'start_date' => 'date',
36
        'end_date' => 'date',
37
    ];
38
    protected $fillable = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
39
        'name',
40
        'institution',
41
        'course_status_id',
42
        'start_date',
43
        'end_date'
44
    ];
45
46
    public function course_status()
2 ignored issues
show
Coding Style introduced by
Method name "Course::course_status" is not in camel caps format
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function course_status()
Loading history...
introduced by
Method \App\Models\Course::course_status() does not have return type hint nor @return annotation for its return value.
Loading history...
47
    {
48
        return $this->belongsTo(\App\Models\Lookup\CourseStatus::class);
49
    }
50
51
    public function courseable()
2 ignored issues
show
introduced by
Method \App\Models\Course::courseable() 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 courseable()
Loading history...
52
    {
53
        return $this->morphTo();
54
    }
55
}
56