Passed
Pull Request — master (#16)
by
unknown
06:16 queued 02:52
created

EasycreditToHttpClientAdapter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 1
c 1
b 1
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * MIT License
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace SprykerEco\Zed\Easycredit\Dependency\External;
9
10
use GuzzleHttp\Client;
11
12
class EasycreditToHttpClientAdapter implements EasycreditToHttpClientInterface
13
{
14
    /**
15
     * @var \GuzzleHttp\ClientInterface
16
     */
17
    protected $client;
18
19
    public function __construct()
20
    {
21
        $this->client = new Client();
22
    }
23
24
    /**
25
     * @param string $method
26
     * @param string $uri
27
     * @param array<string, mixed> $options
28
     *
29
     * @return \SprykerEco\Zed\Easycredit\Dependency\External\EasycreditToHttpResponseInterface
30
     */
31
    public function request(string $method, string $uri, array $options = []): EasycreditToHttpResponseInterface
32
    {
33
        $response = $this->client->request($method, $uri, $options);
34
35
        return new EasycreditToHttpResponseAdapter($response);
36
    }
37
}
38