Completed
Pull Request — master (#483)
by
unknown
03:10
created

Mock   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 53
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 53
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A request() 0 3 1
A getAuthorizationUri() 0 3 1
A getAuthorizationEndpoint() 0 3 1
A getAccessTokenEndpoint() 0 3 1
A testDetermineRequestUriFromPath() 0 4 1
1
<?php
2
3
namespace OAuthTest\Mocks\Common\Service;
4
5
use OAuth\Common\Service\AbstractService;
6
use OAuth\Common\Http\Uri\UriInterface;
7
8
class Mock extends AbstractService
9
{
10
    /**
11
     * Sends an authenticated API request to the path provided.
12
     * If the path provided is not an absolute URI, the base API Uri (service-specific) will be used.
13
     *
14
     * @param string|UriInterface $path
15
     * @param string              $method       HTTP method
16
     * @param array               $body         Request body if applicable (an associative array will
17
     *                                          automatically be converted into a urlencoded body)
18
     * @param array               $extraHeaders Extra headers if applicable. These will override service-specific
19
     *                                          any defaults.
20
     *
21
     * @return string
22
     */
23
    public function request($path, $method = 'GET', $body = null, array $extraHeaders = array())
24
    {
25
    }
26
27
    /**
28
     * Returns the url to redirect to for authorization purposes.
29
     *
30
     * @param array $additionalParameters
31
     *
32
     * @return UriInterface
33
     */
34
    public function getAuthorizationUri(array $additionalParameters = array())
35
    {
36
    }
37
38
    /**
39
     * Returns the authorization API endpoint.
40
     *
41
     * @return UriInterface
42
     */
43
    public function getAuthorizationEndpoint()
44
    {
45
    }
46
47
    /**
48
     * Returns the access token API endpoint.
49
     *
50
     * @return UriInterface
51
     */
52
    public function getAccessTokenEndpoint()
53
    {
54
    }
55
56
    public function testDetermineRequestUriFromPath($path, UriInterface $baseApiUri = null)
57
    {
58
        return $this->determineRequestUriFromPath($path, $baseApiUri);
59
    }
60
}
61