Mock   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
eloc 6
dl 0
loc 25
c 1
b 0
f 0
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A parseRequestTokenResponse() 0 3 1
A getAuthorizationEndpoint() 0 3 1
A getAccessTokenEndpoint() 0 3 1
A getRequestTokenEndpoint() 0 3 1
A parseAccessTokenResponse() 0 3 1
1
<?php
2
3
namespace OAuthTest\Mocks\OAuth1\Service;
4
5
use OAuth\Common\Http\Uri\Uri;
6
use OAuth\OAuth1\Service\AbstractService;
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