Completed
Pull Request — dev (#319)
by Tristan
07:50
created

Reference   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A applicant() 0 2 1
A projects() 0 2 1
A relationship() 0 2 1
A skill_declarations() 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
use App\Models\SkillDeclaration;
10
11
/**
12
 * Class Reference
13
 *
14
 * @property int $id
15
 * @property string $name
16
 * @property string $email
17
 * @property int $relationship_id
18
 * @property int $applicant_id
19
 * @property string $description
20
 * @property \Jenssegers\Date\Date $created_at
21
 * @property \Jenssegers\Date\Date $updated_at
22
 *
23
 * @property \App\Models\Lookup\Relationship $relationship
24
 * @property \App\Models\Applicant $applicant
25
 * @property \Illuminate\Database\Eloquent\Collection $projects
26
 * @property \Illuminate\Database\Eloquent\Collection $skill_declaractions
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 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...
29
30
    protected $casts = [
31
        'name' => 'string',
32
        'email' => 'string',
33
        'description' => 'string',
34
        'relationship_id' => 'int',
35
        'applicant_id' => 'int',
36
    ];
37
    protected $fillable = [
38
        'name',
39
        'email',
40
        'relationship_id',
41
        'description'
42
    ];
43
44
    public function relationship() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function relationship()
Loading history...
45
        return $this->belongsTo(\App\Models\Lookup\Relationship::class);
46
    }
47
48
    public function applicant() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function applicant()
Loading history...
49
        return $this->belongsTo(\App\Models\Applicant::class);
50
    }
51
52
    public function projects() {
0 ignored issues
show
Coding Style introduced by
Missing doc comment for function projects()
Loading history...
53
        return $this->belongsToMany(\App\Models\Project::class);
54
    }
55
56
    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 "Reference::skill_declarations" is not in camel caps format
Loading history...
57
        return $this->belongsToMany(\App\Models\SkillDeclaration::class);
58
    }
59
60
}
61