Completed
Push — master ( be9bb8...2c2840 )
by Klochok
04:07 queued 13s
created

MonitoringSettingsForm::run()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 10
cc 1
nc 1
nop 0
crap 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;
12
13
use yii\bootstrap\Widget;
14
use Yii;
15
16
class MonitoringSettingsForm extends Widget
17
{
18
    /**
19
     * @var string
20
     */
21
    public $title;
22
23
    /**
24
     * @var string
25
     */
26
    public $validationUrl;
27
28
    /**
29
     * @var string
30
     */
31
    public $breadcrumbsLabel;
32
33
    /**
34
     * @var Server|Hub
35
     */
36
    public $model;
37
38
    /**
39
     * @var array
40
     */
41
    public $nicMediaOptions;
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function run()
47
    {
48
        return $this->render('MonitoringSettingsForm', [
49
            'label' => $this->breadcrumbsLabel,
50
            'model' => $this->model,
51
            'title' => $this->title ?? Yii::t('hipanel:server', 'Monitoring properties'),
52
            'nicMediaOptions' => $this->nicMediaOptions,
53
        ]);
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    private function getActionUrl(): string
0 ignored issues
show
Unused Code introduced by
The method getActionUrl() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
60
    {
61
        return $this->actionUrl;
0 ignored issues
show
Bug Best Practice introduced by
The property actionUrl does not exist on hipanel\modules\server\w...\MonitoringSettingsForm. Since you implemented __get, consider adding a @property annotation.
Loading history...
62
    }
63
64
    /**
65
     * @return string
66
     */
67
    private function getValidationUrl(): string
0 ignored issues
show
Unused Code introduced by
The method getValidationUrl() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
68
    {
69
        return $this->validationUrl;
70
    }
71
}
72