Hostkeys::getTransition()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
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