PoweredBy::run()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
ccs 0
cts 9
cp 0
cc 1
nc 1
nop 0
crap 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
15
/**
16
 * PoweredBy widget.
17
 * @author Andrii Vasyliev <[email protected]>
18
 */
19
class PoweredBy extends Widget
20
{
21
    /**
22
     * @var string|array url to empowerer
23
     */
24
    public $url;
25
26
    /**
27
     * @var string name to display
28
     */
29
    public $name;
30
31
    /**
32
     * @var string version to display if given
33
     */
34
    public $version;
35
36
    /**
37
     * @var array html options
38
     */
39
    public $options = [];
40
41
    public function run()
42
    {
43
        return $this->render('PoweredBy', [
44
            'url'     => $this->url,
45
            'name'    => $this->name,
46
            'version' => $this->version,
47
            'options' => $this->options,
48
        ]);
49
    }
50
}
51