Completed
Push — master ( ac047e...863ff8 )
by Sheela
06:46
created

DutySwap   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 18
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A imageable() 0 4 1
A duty() 0 4 1
1
<?php
2
3
namespace SET;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class DutySwap extends Model
8
{
9
    protected $table = 'duty_swaps';
10
11
    public $timestamps = true;
12
13
    protected $fillable = ['imageable_id', 'imageable_type', 'duty_id', 'date'];
14
15
    public function imageable()
16
    {
17
        return $this->morphTo();
18
    }
19
20
    public function duty()
21
    {
22
        return $this->belongsTo('SET\Duty');
23
    }
24
}
25