BaseWidget   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 2
c 3
b 0
f 1
lcom 0
cbo 1
dl 0
loc 46
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 4 1
A run() 0 3 1
1
<?php
2
/**
3
 * @link http://www.writesdown.com/
4
 * @copyright Copyright (c) 2015 WritesDown
5
 * @license http://www.writesdown.com/license/
6
 */
7
8
namespace common\components;
9
10
use yii\base\Object;
11
12
/**
13
 * Class BaseWidget
14
 *
15
 * @author Agiel K. Saputra <[email protected]>
16
 * @since 0.2.0
17
 */
18
abstract class BaseWidget extends Object
19
{
20
    /**
21
     * @var integer Id of active widget that can be used for id of HTML element.
22
     */
23
    public $id;
24
    /**
25
     * @var string
26
     */
27
    public $title = '';
28
29
    /**
30
     * @var string
31
     */
32
    public $beforeTitle = '';
33
34
    /**
35
     * @var string
36
     */
37
    public $afterTitle = '';
38
39
    /**
40
     * @var string
41
     */
42
    public $beforeWidget = '';
43
44
    /**
45
     * @var string
46
     */
47
    public $afterWidget = '';
48
49
    /**
50
     * @inheritdoc
51
     */
52
    public function init()
53
    {
54
        $this->run();
55
    }
56
57
    /**
58
     * Executes the widget.
59
     */
60
    public function run()
61
    {
62
    }
63
}
64