RelatedItem::related()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
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