OrganizationLink   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A run() 0 8 2
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\Html;
15
16
/**
17
 * OrganizationLink widget.
18
 * @author Andrii Vasyliev <[email protected]>
19
 */
20
class OrganizationLink extends Widget
21
{
22
    /**
23
     * @var string|array url to organization
24
     */
25
    public $url;
26
27
    /**
28
     * @var string name to display
29
     */
30
    public $name;
31
32
    /**
33
     * @var array html options
34
     */
35
    public $options = [];
36
37
    public function run()
38
    {
39
        return $this->render('OrganizationLink', [
40
            'url'     => $this->url,
41
            'name'    => $this->name ?: 'Organization',
42
            'options' => $this->options,
43
        ]);
44
    }
45
}
46