UserMenu   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 10 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\helpers\ArrayHelper;
14
15
/**
16
 * UserMenu widget.
17
 * @author Andrii Vasyliev <[email protected]>
18
 */
19
class UserMenu extends \yii\base\Widget
20
{
21
    public $options = [];
22
23
    public $items = [];
24
25
    public function run()
26
    {
27
        return $this->render('UserMenu', [
28
            'header'    => ArrayHelper::remove($this->items, 'header'),
29
            'logout'    => ArrayHelper::remove($this->items, 'logout'),
30
            'profile'   => ArrayHelper::remove($this->items, 'profile'),
31
            'items'     => $this->items,
32
            'options'   => $this->options,
33
        ]);
34
    }
35
}
36