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

WorkSample   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 16
dl 0
loc 31
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A file_type() 0 3 1
A skill_declarations() 0 3 1
A work_sampleable() 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 WorkSample
12
 *
13
 * @property int $id
14
 * @property string $name
15
 * @property \Jenssegers\Date\Date $date_created
16
 * @property int $file_type_id
17
 * @property string $url
18
 * @property string $description
19
 * @property int $work_sampleable_id
20
 * @property string $work_sampleable_type
21
 * @property \Jenssegers\Date\Date $created_at
22
 * @property \Jenssegers\Date\Date $updated_at
23
 *
24
 * @property \App\Models\Lookup\FileType $file_type
25
 * @property \Illuminate\Database\Eloquent\Collection $skill_declarations
26
 * @property \App\Models\Applicant|\App\Models\JobApplication $work_sampleable
27
 */
28
class WorkSample 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
        'file_type_id' => 'int',
34
        'date_created' => 'date',
35
        'url' => 'string',
36
        'description' => 'string',
37
    ];
38
    protected $fillable = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
39
        'name',
40
        'date_created',
41
        'file_type_id',
42
        'url',
43
        'description'
44
    ];
45
46
    public function file_type()
2 ignored issues
show
Coding Style introduced by
Method name "WorkSample::file_type" is not in camel caps format
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function file_type()
Loading history...
introduced by
Method \App\Models\WorkSample::file_type() does not have return type hint nor @return annotation for its return value.
Loading history...
47
    {
48
        return $this->belongsTo(\App\Models\Lookup\FileType::class);
49
    }
50
51
    public function skill_declarations()
2 ignored issues
show
Coding Style Documentation introduced by
Missing doc comment for function skill_declarations()
Loading history...
Coding Style introduced by
Method name "WorkSample::skill_declarations" is not in camel caps format
Loading history...
introduced by
Method \App\Models\WorkSample::skill_declarations() does not have return type hint nor @return annotation for its return value.
Loading history...
52
    {
53
        return $this->belongsToMany(\App\Models\SkillDeclaration::class);
54
    }
55
56
    public function work_sampleable()
2 ignored issues
show
introduced by
Method \App\Models\WorkSample::work_sampleable() 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 work_sampleable()
Loading history...
Coding Style introduced by
Method name "WorkSample::work_sampleable" is not in camel caps format
Loading history...
57
    {
58
        return $this->morphTo();
59
    }
60
}
61