Completed
Push — master ( 154e2e...1851c4 )
by Klochok
37:11 queued 22:06
created

MonitoringSettings   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 8 1
A getEmailsDefault() 0 4 1
A getNicMediaDefault() 0 4 1
A getChanelLoadDefault() 0 4 1
A getWatchTrafdownDefault() 0 4 1
1
<?php
2
3
namespace hipanel\modules\server\models;
4
5
class MonitoringSettings extends \hipanel\base\Model
6
{
7
    public function rules()
8
    {
9
        return [
10
            [['id', 'nic_media', 'channel_load'], 'integer'],
11
            [['watch_trafdown', 'vcdn_only'], 'boolean'],
12
            [['server', 'emails', 'minutes', 'comment'], 'string'],
13
        ];
14
    }
15
16
    public function getEmailsDefault()
17
    {
18
        return '[email protected]';
19
    }
20
21
    public function getNicMediaDefault()
22
    {
23
        return 40696899;
24
    }
25
26
    public function getChanelLoadDefault()
27
    {
28
        return 90;
29
    }
30
31
    public function getWatchTrafdownDefault()
32
    {
33
        return true;
34
    }
35
}
36