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

Reference   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
eloc 14
dl 0
loc 25
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A skills() 0 2 1
A projects() 0 2 1
A relationship() 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 Reference
12
 *
13
 * @property int $id
14
 * @property string $name
15
 * @property string $email
16
 * @property int $relationship_id
17
 * @property string $description
18
 * @property \Jenssegers\Date\Date $created_at
19
 * @property \Jenssegers\Date\Date $updated_at
20
 *
21
 * @property \App\Models\Lookup\Relationship $relationship
22
 * @property \Illuminate\Database\Eloquent\Collection $projects
23
 * @property \Illuminate\Database\Eloquent\Collection $skills
24
 */
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...
25
class Reference 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...
26
27
    protected $casts = [
28
        'name' => 'string',
29
        'email' => 'string',
30
        'description' => 'string',
31
        'relationship_id' => 'int',
32
    ];
33
    protected $fillable = [
34
        'name',
35
        'email',
36
        'relationship_id',
37
        'description'
38
    ];
39
40
    public function relationship() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function relationship()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
41
        return $this->belongsTo(\App\Models\Lookup\Relationship::class);
42
    }
43
44
    public function projects() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function projects()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
45
        return $this->belongsToMany(\App\Models\Project::class);
46
    }
47
48
    public function skills() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function skills()
Loading history...
Coding Style introduced by
Opening brace should be on a new line
Loading history...
49
        return $this->belongsToMany(\App\Models\Skill::class);
50
    }
51
52
}
53