Completed
Push — master ( 74c9a9...1153e3 )
by Andrii
11:57 queued 07:40
created

ConfigProfile   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 7
c 1
b 0
f 0
dl 0
loc 17
ccs 0
cts 10
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 6 1
A tableName() 0 3 1
1
<?php
2
/**
3
 * Server module for HiPanel
4
 *
5
 * @link      https://github.com/hiqdev/hipanel-module-server
6
 * @package   hipanel-module-server
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2019, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hipanel\modules\server\models;
12
13
use hipanel\base\Model;
14
use hipanel\base\ModelTrait;
15
16
class ConfigProfile extends Model
17
{
18
    use ModelTrait;
19
20
    /** {@inheritdoc} */
21
    public static function tableName()
22
    {
23
        return 'profile';
24
    }
25
26
    /** {@inheritdoc} */
27
    public function rules()
28
    {
29
        return [
30
            [['id'], 'integer'],
31
            [['name', 'label', 'type', 'class'], 'string'],
32
            [['class'], 'default', 'value' => 'config'],
33
        ];
34
    }
35
}
36