Lianluo   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A initUserAttributes() 0 4 1
A defaultName() 0 4 1
A defaultTitle() 0 4 1
A defaultViewOptions() 0 7 1
1
<?php
2
namespace zacksleo\yii2\authclient\clients;
3
4
use yii\authclient\OAuth2;
5
6
class Lianluo extends OAuth2
7
{
8
    public $authUrl = 'https://mops-ucenter.lianluo.com/oauth2/auth';
9
    public $tokenUrl = 'https://mops-ucenter.lianluo.com/oauth2/token';
10
    public $apiBaseUrl = 'https://mops-ucenter.lianluo.com/api/oauth2/v1';
11
12
    protected function initUserAttributes()
13
    {
14
        return $this->api('users', 'GET');
15
    }
16
17
    protected function defaultName()
18
    {
19
        return '联络互动';
20
    }
21
22
    protected function defaultTitle()
23
    {
24
        return '联络互动';
25
    }
26
27
    protected function defaultViewOptions()
28
    {
29
        return [
30
            'popupWidth' => 800,
31
            'popupHeight' => 500
32
        ];
33
    }
34
}
35