Completed
Push — master ( fde715...d0bc22 )
by Klochok
29:59 queued 15:01
created

HardwareSettings   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 1
dl 0
loc 29
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A tableName() 0 4 1
A primaryKey() 0 4 1
A scenarioActions() 0 6 1
A rules() 0 7 1
1
<?php
2
3
namespace hipanel\modules\server\models;
4
5
class HardwareSettings extends \hipanel\base\Model
6
{
7
    const SCENARIO_DEFAULT = 'dumb';
8
9
    public static function tableName()
10
    {
11
        return 'server';
12
    }
13
14
    public static function primaryKey()
15
    {
16
        return ['id'];
17
    }
18
19
    public function scenarioActions()
20
    {
21
        return [
22
            'default' => 'set-software-settings'
23
        ];
24
    }
25
26
    public function rules()
27
    {
28
        return [
29
            [['id'], 'integer'],
30
            [['summary', 'order_no', 'brand', 'box', 'cpu', 'ram', 'motherboard', 'hdd', 'hotswap', 'raid', 'units', 'note', 'cage_no', 'rack_no', 'datacenter'], 'string'],
31
        ];
32
    }
33
}
34