Completed
Push — master ( c69a04...dc1454 )
by
unknown
15:08 queued 13:13
created

Hostkeys   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 28
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getState() 0 4 1
A getTransition() 0 4 1
A getUserName() 0 4 1
1
<?php
2
3
namespace App;
4
5
use Illuminate\Notifications\Notifiable;
6
use Illuminate\Database\Eloquent\Model;
7
use Illuminate\Database\Eloquent\SoftDeletes;
8
9
class Hostkeys extends Model
10
{
11
    use Notifiable;
12
13
    protected $table = 'host_keys';
14
    public $timestamps = true;
15
16
    use SoftDeletes;
17
18
    protected $dates = ['deleted_at'];
19
    protected $fillable = array('hostname', 'keys', 'state', 'transition', 'user_id');
20
21
    public function getState()
22
    {
23
        return $this->belongsTo('Bantenprov\Workflow\Models\WorkflowState', 'state', 'id');
24
    }
25
26
    public function getTransition()
27
    {
28
        return $this->belongsTo('Bantenprov\Workflow\Models\WorkflowTransition', 'transition', 'id');
29
    }
30
31
    public function getUserName()
32
    {
33
        return $this->belongsTo('App\User','user_id','id');
34
    }
35
36
}
37