RelatedItem   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getTable() 0 3 1
A related() 0 3 1
A subject() 0 3 1
1
<?php
2
3
namespace A17\Twill\Models;
4
5
use Illuminate\Database\Eloquent\Model as BaseModel;
6
7
class RelatedItem extends BaseModel
8
{
9
    protected $guarded = [];
10
11
    protected $primaryKey = null;
12
13
    public $incrementing = false;
14
15
    public $timestamps = false;
16
17
    public function related()
18
    {
19
        return $this->morphTo('related');
20
    }
21
22
    public function subject()
23
    {
24
        return $this->morphTo('subject');
25
    }
26
27
    public function getTable()
28
    {
29
        return config('twill.related_table', 'twill_related');
30
    }
31
}
32