Completed
Push — master ( 15aae6...22f267 )
by Klochok
14:21
created

MonitoringSettings   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 4
c 2
b 0
f 1
lcom 0
cbo 1
dl 0
loc 30
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A tableName() 0 4 1
A rules() 0 8 1
A primaryKey() 0 4 1
A scenarioActions() 0 6 1
1
<?php
2
3
namespace hipanel\modules\server\models;
4
5
class MonitoringSettings extends \hipanel\base\Model
6
{
7
    const SCENARIO_DEFAULT = 'dumb';
8
9
    public static function tableName()
10
    {
11
        return 'server';
12
    }
13
14
    public function rules()
15
    {
16
        return [
17
            [['id', 'nic_media', 'channel_load'], 'integer'],
18
            [['watch_trafdown', 'vcdn_only'], 'boolean'],
19
            [['server', 'emails', 'minutes', 'comment'], 'string'],
20
        ];
21
    }
22
23
    public static function primaryKey()
24
    {
25
        return ['id'];
26
    }
27
28
    public function scenarioActions()
29
    {
30
        return [
31
            'default' => 'set-monitoring-settings'
32
        ];
33
    }
34
}
35