Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.5 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
31 | 324 | public function __construct(ClientInterface $client = null) |
|
32 | { |
||
33 | 324 | if (!$client) { |
|
34 | $handlerStack = new HandlerStack(\GuzzleHttp\choose_handler()); |
||
35 | $handlerStack->push(Middleware::prepareBody(), 'prepare_body'); |
||
36 | $client = new GuzzleClient(['handler' => $handlerStack]); |
||
37 | } |
||
38 | 324 | $this->client = $client; |
|
39 | 324 | } |
|
40 | |||
51 |