Passed
Push — bugfix/job_translation_fields ( dcec43...2ad85b )
by Tristan
14:10
created

WorkSample   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A application_work_samples() 0 2 1
A file_type() 0 2 1
A skill_declarations() 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
Missing @link tag in file comment
Loading history...
Coding Style introduced by
Missing @category tag in file comment
Loading history...
Coding Style introduced by
Missing @author tag in file comment
Loading history...
Coding Style introduced by
PHP version not specified
Loading history...
Coding Style introduced by
Missing @package tag in file comment
Loading history...
Coding Style introduced by
Missing @license tag in file comment
Loading history...
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 string $applicant_id
20
 * @property \Jenssegers\Date\Date $created_at
21
 * @property \Jenssegers\Date\Date $updated_at
22
 *
23
 * @property \App\Models\Lookup\FileType $file_type
24
 * @property \Illuminate\Database\Eloquent\Collection $application_work_samples
25
 * @property \Illuminate\Database\Eloquent\Collection $skill_declarations
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 WorkSample 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
        'file_type_id' => 'int',
33
        'date_created' => 'date',
34
        'url' => 'string',
35
        'description' => 'string',
36
        'applicant_id' => 'int'
37
    ];
38
    protected $fillable = [
39
        'name',
40
        'date_created',
41
        'file_type_id',
42
        'url',
43
        'description'
44
    ];
45
46
    public function file_type() {
0 ignored issues
show
Coding Style introduced by
Public method name "WorkSample::file_type" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function file_type()
Loading history...
47
        return $this->belongsTo(\App\Models\Lookup\FileType::class);
48
    }
49
50
    public function application_work_samples() {
0 ignored issues
show
Coding Style introduced by
Public method name "WorkSample::application_work_samples" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function application_work_samples()
Loading history...
51
        return $this->hasMany(\App\Models\ApplicationWorkSample::class);
52
    }
53
54
    public function skill_declarations() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function skill_declarations()
Loading history...
Coding Style introduced by
Public method name "WorkSample::skill_declarations" is not in camel caps format
Loading history...
55
        return $this->belongsToMany(\App\Models\SkillDeclaration::class);
56
    }
57
58
    public function applicant() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function applicant()
Loading history...
59
        return $this->belongsTo(\App\Models\Applicant::class);
60
    }
61
62
}
63