Completed
Push — master ( 02cb29...15ff97 )
by
unknown
01:16
created

Module::getConfigUrl()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace humhub\modules\discordapp;
4
5
use Yii;
6
use yii\helpers\Url;
7
use humhub\components\Module as BaseModule;
8
9
class Module extends BaseModule
10
{
11
12
    public $resourcesPath = 'resources';
13
<?php
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected '<', expecting T_FUNCTION or T_CONST
Loading history...
14
15
namespace humhub\modules\discordapp;
16
17
use Yii;
18
use yii\helpers\Url;
19
use humhub\components\Module as BaseModule;
20
21
class Module extends BaseModule
22
{
23
24
    public $resourcesPath = 'resources';
25
26
    /**
27
     * @inheritdoc
28
     */
29
    public function getConfigUrl()
30
    {
31
        return Url::to(['/discordapp/admin']);
32
    }
33
34
    public function getServerUrl()
35
    {
36
        $url = $this->settings->get('serverUrl');
37
        if (empty($url)) {
38
            return 'https://discordapp.com' || 'https://discord.com';
39
        }
40
        return $url;
41
    }
42
43
}
44
45
    /**
46
     * @inheritdoc
47
     */
48
    public function getConfigUrl()
49
    {
50
        return Url::to(['/discordapp/admin']);
51
    }
52
    public function getServerUrl()
53
    {
54
        $url = $this->settings->get('serverUrl');
55
        if (empty($url)) {
56
            return 'https://discordapp.com' || 'https://discord.com';
57
        }
58
        return $url;
59
    }
60
61
}
62