Completed
Pull Request — master (#484)
by
unknown
04:41
created

Mock   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getRequestTokenEndpoint() 0 4 1
A getAuthorizationEndpoint() 0 4 1
A getAccessTokenEndpoint() 0 4 1
A parseRequestTokenResponse() 0 4 1
A parseAccessTokenResponse() 0 4 1
1
<?php
2
3
namespace OAuthTest\Mocks\OAuth1\Service;
4
5
use OAuth\OAuth1\Service\AbstractService;
6
use OAuth\Common\Http\Uri\Uri;
7
use OAuth\OAuth1\Token\StdOAuth1Token;
8
9
class Mock extends AbstractService
10
{
11
    public function getRequestTokenEndpoint()
12
    {
13
        return new Uri('http://pieterhordijk.com/token');
14
    }
15
16
    public function getAuthorizationEndpoint()
17
    {
18
        return new Uri('http://pieterhordijk.com/auth');
19
    }
20
21
    public function getAccessTokenEndpoint()
22
    {
23
        return new Uri('http://pieterhordijk.com/access');
24
    }
25
26
    protected function parseRequestTokenResponse($responseBody)
27
    {
28
        return new StdOAuth1Token();
29
    }
30
31
    protected function parseAccessTokenResponse($responseBody)
32
    {
33
        return new StdOAuth1Token();
34
    }
35
}
36