Total Complexity | 2 |
Total Lines | 41 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class TestingServiceClient extends ServiceClient |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * Method returns concrete url by it's locator |
||
20 | * |
||
21 | * @param string $urlLocator |
||
22 | * url locator |
||
23 | * @return string concrete URL |
||
24 | */ |
||
25 | public function getRequestUriPublic(string $urlLocator): string |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Result of the sendRequest method |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | public $sendRequestResult = [ |
||
36 | 'body', |
||
37 | 1 |
||
38 | ]; |
||
39 | |||
40 | /** |
||
41 | * |
||
42 | * @param string $url |
||
43 | * URL |
||
44 | * @param array $headers |
||
45 | * Headers |
||
46 | * @param string $method |
||
47 | * Request HTTP Method |
||
48 | * @param array $data |
||
49 | * Request data |
||
50 | * @return array Response body and HTTP code |
||
51 | * @codeCoverageIgnore |
||
52 | */ |
||
53 | protected function sendRequest(string $url, array $headers, string $method, array $data = []): array |
||
58 |