ServiceHost::service()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: chenyihong
5
 * Date: 16/8/1
6
 * Time: 15:17
7
 */
8
9
namespace Leo108\CAS\Models;
10
11
use Illuminate\Database\Eloquent\Model;
12
13
/**
14
 * Class ServiceHost
15
 * @package Leo108\CAS\Models
16
 *
17
 * @property integer $service_id
18
 * @property Service $service
19
 */
20
class ServiceHost extends Model
21
{
22
    protected $table = 'cas_service_hosts';
23
    public $timestamps = false;
24
    protected $fillable = ['host'];
25
26
    public function service()
27
    {
28
        return $this->belongsTo(Service::class);
29
    }
30
}
31