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

Reference::projects()   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 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