Completed
Push — master ( b90ae2...874b51 )
by Dmitry
09:53 queued 05:25
created

PanelServerCombo::init()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 9.4285
cc 2
eloc 4
nc 2
nop 0
crap 6
1
<?php
2
3
/*
4
 * Server module for HiPanel
5
 *
6
 * @link      https://github.com/hiqdev/hipanel-module-server
7
 * @package   hipanel-module-server
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015-2016, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hipanel\modules\server\widgets\combo;
13
14
/**
15
 * Class Server.
16
 */
17
class PanelServerCombo extends ServerCombo
18
{
19
    public $state;
20
21
    public function init()
22
    {
23
        parent::init();
24
25
        if ($this->state !== null) {
26
            $this->_filter['state'] = ['format' => $this->state];
27
        }
28
    }
29
30
    public $_filter = [
31
        'client' => 'client/client',
32
        'panel' => ['format' => 'rcp'],
33
    ];
34
}
35