TextPanel::rules()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace cornernote\dashboard\panels;
4
5
use cornernote\dashboard\Panel;
6
use Yii;
7
8
/**
9
 * TextPanel
10
 * @package cornernote\dashboard\panels
11
 */
12
class TextPanel extends Panel
13
{
14
15
    /**
16
     * @var string
17
     */
18
    public $text;
19
20
    /**
21
     * @var string
22
     */
23
    public $viewPath = '@cornernote/dashboard/views/dashboard/panels/text';
24
25
    /**
26
     * @inheritdoc
27
     */
28
    public function rules()
29
    {
30
        return [
31
            [['text'], 'required'],
32
        ];
33
    }
34
35
}