DiscordappFrame::run()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 2
nc 2
nop 0
1
<?php
2
3
namespace humhub\modules\discordapp\widgets;
4
5
use Yii;
6
use yii\base\Widget;
7
8
/**
9
 *
10
 * @author Felli
11
 */
12
class DiscordappFrame extends Widget
13
{
14
    public $contentContainer;
15
16
    /**
17
     * @inheritdoc
18
     */
19
    public function run()
20
    {
21
        $url = Yii::$app->getModule('discordapp')->getServerUrl() . '/widget?id=';
22
23
        if (!$url) {
24
            return '';
25
        }
26
27
        return $this->render('discordappframe', ['discordappUrl' => $url]);
28
    }
29
}
30