Module   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 20
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfigUrl() 0 4 1
A getServerUrl() 0 8 2
1
<?php
2
3
namespace humhub\modules\patreon;
4
5
use Yii;
6
use yii\helpers\Url;
7
8
class Module extends \humhub\components\Module
9
{
10
11
    /**
12
     * @inheritdoc
13
     */
14
    public function getConfigUrl()
15
    {
16
        return Url::to(['/patreon/admin']);
17
    }
18
    public function getServerUrl()
19
    {
20
        $url = $this->settings->get('serverUrl');
21
        if (empty($url)) {
22
            return 'https://www.patreon.com';
23
        }
24
        return $url;
25
    }
26
27
}
28