GuzzleDriver::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace BitWasp\Bitcoind\Guzzle;
4
5
use GuzzleHttp\Client;
6
use Nbobtc\Http\Driver\DriverInterface;
7
use Psr\Http\Message\RequestInterface;
8
9
class GuzzleDriver implements DriverInterface
10
{
11
    /**
12
     * @var \GuzzleHttp\Client
13
     */
14
    private $client;
15
16
    public function __construct(Client $client)
17
    {
18
        $this->client = $client;
19
    }
20
21
    /**
22
     * @param RequestInterface $request
23
     * @return mixed|\Psr\Http\Message\ResponseInterface
24
     */
25
    public function execute(RequestInterface $request)
26
    {
27
        $request = $request->withMethod('POST');
28
        return $this->client->send($request);
29
    }
30
}
31