TestClient   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 2
eloc 6
c 0
b 0
f 0
dl 0
loc 39
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getCommonHeadersPublic() 0 3 1
A sendRequest() 0 5 1
1
<?php
2
namespace Mezon\CustomClient\Tests;
3
4
use Mezon\CustomClient\CustomClient;
5
6
class TestClient extends CustomClient
7
{
8
9
    /**
10
     * HTTP code
11
     *
12
     * @var integer
13
     */
14
    public $httpCode = 0;
15
16
    /**
17
     * Getting headers
18
     *
19
     * @return array
20
     */
21
    public function getCommonHeadersPublic(): array
22
    {
23
        return parent::getCommonHeaders();
24
    }
25
26
    /**
27
     * Method send request to the URL
28
     *
29
     * @param string $url
30
     *            URL
31
     * @param array $headers
32
     *            Headers
33
     * @param string $method
34
     *            Request HTTP Method
35
     * @param array $data
36
     *            Request data
37
     * @return array Response body and HTTP code
38
     * @codeCoverageIgnore
39
     */
40
    protected function sendRequest(string $url, array $headers, string $method, array $data = []): array
41
    {
42
        return [
43
            '',
44
            $this->httpCode
45
        ];
46
    }
47
}
48