Service   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A hosts() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: chenyihong
5
 * Date: 16/8/1
6
 * Time: 15:06
7
 */
8
9
namespace Leo108\CAS\Models;
10
11
use Illuminate\Database\Eloquent\Model;
12
13
/**
14
 * Class Service
15
 * @package Leo108\CAS\Models
16
 *
17
 * @property string  $name
18
 * @property boolean $allow_proxy
19
 * @property boolean $enabled
20
 */
21
class Service extends Model
22
{
23
    protected $table = 'cas_services';
24
    protected $fillable = ['name', 'enabled', 'allow_proxy'];
25
    protected $casts = [
26
        'enabled'     => 'boolean',
27
        'allow_proxy' => 'boolean',
28
    ];
29
30
    public function hosts()
31
    {
32
        return $this->hasMany(ServiceHost::class);
33
    }
34
}
35