Completed
Pull Request — dev (#317)
by Tristan
06:21
created

Skill   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A skill_declarations() 0 2 1
A skill_type() 0 2 1
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
 */
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...
20
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...
21
22
    protected $casts = [
23
        'name' => 'int',
24
        'skill_type_id' => 'string'
25
    ];
26
    protected $fillable = [
27
        'name',
28
        'skill_type_id'
29
    ];
30
31
    public function skill_type() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function skill_type()
Loading history...
Coding Style introduced by
Public method name "Skill::skill_type" is not in camel caps format
Loading history...
32
        return $this->belongsTo(\App\Models\Lookup\SkillType::class);
33
    }
34
35
    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 "Skill::skill_declarations" is not in camel caps format
Loading history...
36
        return $this->hasMany(\App\Models\SkillDeclaration::class);
37
    }
38
39
}
40