PanelServerCombo   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A init() 0 7 2
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\widgets\combo;
12
13
/**
14
 * Class Server.
15
 */
16
class PanelServerCombo extends ServerCombo
17
{
18
    public $state;
19
20
    public function init()
21
    {
22
        parent::init();
23
24
        if ($this->state !== null) {
25
            $this->_filter['state'] = ['format' => $this->state];
26
            $this->_filter['show_last_sale'] = ['format' => 1];
27
        }
28
    }
29
30
    public $_filter = [
31
        'client' => 'client/client',
32
        'panel' => ['format' => 'rcp'],
33
    ];
34
}
35