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

Skill::work_experiences()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 2
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
3
/**
4
 * Created by Reliese Model.
5
 * Date: Thu, 12 Jul 2018 22:39:27 +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
10
/**
11
 * Class Skill
12
 *
13
 * @property int $id
14
 * @property string $name
15
 * @property int $skill_type_id
16
 *
17
 * @property \App\Models\Lookup\SkillType $skill_type
18
 * @property \Illuminate\Database\Eloquent\Collection $skill_declarations
19
 * @property \Illuminate\Database\Eloquent\Collection $work_experiences
20
 * @property \Illuminate\Database\Eloquent\Collection $references
21
 * @property \Illuminate\Database\Eloquent\Collection $work_samples
22
 */
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...
23
class Skill 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...
24
25
    protected $casts = [
26
        'name' => 'string',
27
        'skill_type_id' => 'int'
28
    ];
29
    protected $fillable = [
30
        'name',
31
        'skill_type_id'
32
    ];
33
34
    public function skill_type() {
0 ignored issues
show
Coding Style introduced by
Public method name "Skill::skill_type" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function skill_type()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
35
        return $this->belongsTo(\App\Models\Lookup\SkillType::class);
36
    }
37
38
    public function skill_declarations() {
0 ignored issues
show
Coding Style introduced by
Public method name "Skill::skill_declarations" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function skill_declarations()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
39
        return $this->hasMany(\App\Models\SkillDeclaration::class);
40
    }
41
42
    public function work_experiences() {
0 ignored issues
show
Coding Style introduced by
Public method name "Skill::work_experiences" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function work_experiences()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
43
        return $this->belongsToMany(\App\Models\WorkExperience::class);
44
    }
45
46
    public function references() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function references()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
47
        return $this->belongsToMany(\App\Models\Reference::class);
48
    }
49
50
    public function work_samples() {
0 ignored issues
show
Coding Style introduced by
Public method name "Skill::work_samples" is not in camel caps format
Loading history...
Coding Style introduced by
Missing doc comment for function work_samples()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
51
        return $this->belongsToMany(\App\Models\WorkSample::class);
52
    }
53
54
}
55