FancyPanel   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 28
rs 10
c 0
b 0
f 0
ccs 0
cts 10
cp 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A init() 0 5 1
A run() 0 6 1
1
<?php
2
/**
3
 * Pluggable themes for Yii2
4
 *
5
 * @link      https://github.com/hiqdev/yii2-thememanager
6
 * @package   yii2-thememanager
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2015-2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\thememanager\widgets;
12
13
use yii\base\Widget;
14
use yii\helpers\ArrayHelper;
15
16
/**
17
 * FancyPanel widget.
18
 * @author Andrii Vasyliev <[email protected]>
19
 */
20
class FancyPanel extends Widget
21
{
22
    public $panelClass = 'contactmethod';
23
24
    /**
25
     * Example: darkgray|blue|green|purple.
26
     *
27
     * @var string
28
     */
29
    public $color = 'darkgray';
30
31
    public $title;
32
33
    public $content;
34
35
    public function init()
36
    {
37
        ob_start();
38
        ob_implicit_flush(false);
39
    }
40
41
    public function run()
42
    {
43
        $this->content = ob_get_clean();
44
45
        return $this->render('FancyPanel', ArrayHelper::toArray($this));
46
    }
47
}
48