Passed
Push — master ( eac606...788c0b )
by Alex
03:59
created

AdoptedBaseAuth::requestToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
c 1
b 1
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
namespace Mezon\SocialNetwork\Auth\Tests;
3
4
use Mezon\SocialNetwork\BaseAuth;
5
6
class AdoptedBaseAuth extends BaseAuth
7
{
8
9
    public function getUserInfoUri(string $token = ''): string
10
    {
11
        return 'http://user-info-uri/?' . $token;
12
    }
13
14
    public function getTokenUri(): string
15
    {
16
        return 'http://token-uri';
17
    }
18
19
    public function getOauthUri(): string
20
    {
21
        return 'http://oauth-uri';
22
    }
23
24
    protected function getRequest(string $url): string
25
    {
26
        return json_encode([
27
            'id' => 1,
28
            'picture' => [
29
                'data' => [
30
                    'url' => 'http://'
31
                ]
32
            ]
33
        ]);
34
    }
35
36
    public function requestToken(array $params): array
37
    {
38
        return [
39
            'access_token' => 'some-token'
40
        ];
41
    }
42
}
43