Mock   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

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\Http\Uri\UriInterface;
6
use OAuth\Common\Service\AbstractService;
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 = [])
24
    {
25
    }
26
27
    /**
28
     * Returns the url to redirect to for authorization purposes.
29
     *
30
     * @return UriInterface
31
     */
32
    public function getAuthorizationUri(array $additionalParameters = [])
33
    {
34
    }
35
36
    /**
37
     * Returns the authorization API endpoint.
38
     *
39
     * @return UriInterface
40
     */
41
    public function getAuthorizationEndpoint()
42
    {
43
    }
44
45
    /**
46
     * Returns the access token API endpoint.
47
     *
48
     * @return UriInterface
49
     */
50
    public function getAccessTokenEndpoint()
51
    {
52
    }
53
54
    public function testDetermineRequestUriFromPath($path, ?UriInterface $baseApiUri = null)
55
    {
56
        return $this->determineRequestUriFromPath($path, $baseApiUri);
57
    }
58
}
59