Completed
Push — master ( 7f4619...15aae6 )
by Klochok
12:55
created

SoftwareSettings   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 20
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 7 1
A getOsDefault() 0 4 1
A getBwLimitDefault() 0 4 1
1
<?php
2
3
namespace hipanel\modules\server\models;
4
5
class SoftwareSettings extends \hipanel\base\Model
6
{
7
    public function rules()
8
    {
9
        return [
10
            [['virtual_switch', 'ignore_ip_mon'], 'boolean'],
11
            [['os', 'version', 'ip_mon_comment', 'bw_limit', 'bw_group', 'failure_contacts', 'info'], 'string'],
12
        ];
13
    }
14
15
    public function getOsDefault()
16
    {
17
        return 'FreeBSD';
18
    }
19
20
    public function getBwLimitDefault()
21
    {
22
        return '95%';
23
    }
24
}
25