Passed
Push — release/1.0.17 ( f9f3c1...f9f3c1 )
by Grant
10:46 queued 13s
created

Reference   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 15
dl 0
loc 34
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A projects() 0 3 1
A relationship() 0 3 1
A referenceable() 0 3 1
A skill_declarations() 0 3 1
1
<?php
2
3
/**
4
 * Created by Reliese Model.
5
 * Date: Thu, 12 Jul 2018 22:39:27 +0000.
6
 */
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 int $referenceable_id
18
 * @property string $referenceable_type
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 \Illuminate\Database\Eloquent\Collection $projects
25
 * @property \Illuminate\Database\Eloquent\Collection $skill_declaractions
26
 * @property \App\Models\Applicant|\App\Models\JobApplication $referenceable
27
 */
28
class Reference extends BaseModel
29
{
30
31
    protected $casts = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
32
        'name' => 'string',
33
        'email' => 'string',
34
        'description' => 'string',
35
        'relationship_id' => 'int',
36
    ];
37
    protected $fillable = [
1 ignored issue
show
Coding Style Documentation introduced by
Missing member variable doc comment
Loading history...
38
        'name',
39
        'email',
40
        'relationship_id',
41
        'description'
42
    ];
43
44
    public function relationship()
2 ignored issues
show
Coding Style Documentation introduced by
Missing doc comment for function relationship()
Loading history...
introduced by
Method \App\Models\Reference::relationship() does not have return type hint nor @return annotation for its return value.
Loading history...
45
    {
46
        return $this->belongsTo(\App\Models\Lookup\Relationship::class);
47
    }
48
49
    public function referenceable()
2 ignored issues
show
introduced by
Method \App\Models\Reference::referenceable() does not have return type hint nor @return annotation for its return value.
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function referenceable()
Loading history...
50
    {
51
        return $this->morphTo();
52
    }
53
54
    public function projects()
2 ignored issues
show
introduced by
Method \App\Models\Reference::projects() does not have return type hint nor @return annotation for its return value.
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function projects()
Loading history...
55
    {
56
        return $this->belongsToMany(\App\Models\Project::class);
57
    }
58
59
    public function skill_declarations()
2 ignored issues
show
introduced by
Method \App\Models\Reference::skill_declarations() does not have return type hint nor @return annotation for its return value.
Loading history...
Coding Style Documentation introduced by
Missing doc comment for function skill_declarations()
Loading history...
Coding Style introduced by
Method name "Reference::skill_declarations" is not in camel caps format
Loading history...
60
    {
61
        return $this->belongsToMany(\App\Models\SkillDeclaration::class);
62
    }
63
}
64