| 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 |
||
| 29 | 324 | public function __construct(ClientInterface $client = null) |
|
| 30 | { |
||
| 31 | 324 | if (!$client) { |
|
| 32 | $handlerStack = new HandlerStack(\GuzzleHttp\choose_handler()); |
||
| 33 | $handlerStack->push(Middleware::prepareBody(), 'prepare_body'); |
||
| 34 | $client = new GuzzleClient(['handler' => $handlerStack]); |
||
| 35 | } |
||
| 36 | 324 | $this->client = $client; |
|
| 37 | 324 | } |
|
| 38 | |||
| 59 |