Rrd   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 20
c 0
b 0
f 0
ccs 0
cts 14
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A rules() 0 5 1
A getServer() 0 3 1
A getImages() 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
class Rrd extends \hipanel\base\Model
14
{
15
    use \hipanel\base\ModelTrait;
16
17
    public function rules()
18
    {
19
        return [
20
            [['id'], 'integer'],
21
            [['graphs'], 'safe'],
22
        ];
23
    }
24
25
    public function getServer()
26
    {
27
        return $this->hasOne(Server::class, ['id' => 'id']);
28
    }
29
30
    public function getImages()
31
    {
32
        return $this->hasMany(RrdImage::class, ['id' => 'id']);
33
    }
34
}
35