Passed
Push — next ( bbb9c5...d20d04 )
by Bas
07:19 queued 03:59
created

House   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
c 0
b 0
f 0
dl 0
loc 25
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A head() 0 3 1
A tags() 0 4 1
1
<?php
2
3
namespace TestSetup\Models;
4
5
use LaravelFreelancerNL\Aranguent\Eloquent\Model;
6
7
class House extends Model
8
{
9
    protected $table = 'houses';
10
11
    protected $fillable = [
12
        'id',
13
        'name',
14
        'location_id',
15
    ];
16
17
    /**
18
     * Get the last known residence of the character.
19
     */
20
    public function head()
21
    {
22
        return $this->belongsTo(Character::class, 'led_by');
23
    }
24
25
    /**
26
     * Get all of the tags for the post.
27
     */
28
    public function tags()
29
    {
30
        return $this->morphToMany(Tag::class, 'taggable')
31
            ->using(Taggable::class);
32
    }
33
}
34