@@ -31,11 +31,11 @@ discard block |
||
| 31 | 31 | * @param LoggerInterface|null $logger |
| 32 | 32 | */ |
| 33 | 33 | |
| 34 | - public function __construct(Connection $connection = null,LoggerInterface $logger = null) |
|
| 34 | + public function __construct(Connection $connection = null, LoggerInterface $logger = null) |
|
| 35 | 35 | { |
| 36 | 36 | $this->client = HttpClientDiscovery::find(); |
| 37 | 37 | $this->messageFactory = MessageFactoryDiscovery::find(); |
| 38 | - parent::__construct($connection,$logger); |
|
| 38 | + parent::__construct($connection, $logger); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | /** |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * @return Response |
| 45 | 45 | * @throws \Http\Client\Exception |
| 46 | 46 | */ |
| 47 | - public function execute(Request $request, $params=[]) |
|
| 47 | + public function execute(Request $request, $params = []) |
|
| 48 | 48 | { |
| 49 | 49 | $connection = $this->getConnection(); |
| 50 | 50 | |
@@ -71,8 +71,8 @@ discard block |
||
| 71 | 71 | $message = $this->messageFactory->createRequest($method, $url, $headers, $content); |
| 72 | 72 | try { |
| 73 | 73 | $responsePSR = $this->client->sendRequest($message); |
| 74 | - }catch (\Exception $e) { |
|
| 75 | - throw new ConnectionException($e->getMessage(),$request); |
|
| 74 | + } catch (\Exception $e) { |
|
| 75 | + throw new ConnectionException($e->getMessage(), $request); |
|
| 76 | 76 | } |
| 77 | 77 | $end = microtime(true); |
| 78 | 78 | $status = $responsePSR->getStatusCode(); |
@@ -84,17 +84,17 @@ discard block |
||
| 84 | 84 | 'headers' => $headers, |
| 85 | 85 | 'body' => $request->getBody() |
| 86 | 86 | ]); |
| 87 | - $this->_logger->debug('Request body:',[ |
|
| 87 | + $this->_logger->debug('Request body:', [ |
|
| 88 | 88 | 'connection' => $connection->getConfig(), |
| 89 | 89 | 'payload'=> $request->getBody() |
| 90 | 90 | ]); |
| 91 | - $this->_logger->info('Request:',[ |
|
| 91 | + $this->_logger->info('Request:', [ |
|
| 92 | 92 | 'url' => $url, |
| 93 | 93 | 'status' => $status, |
| 94 | 94 | 'time' => $time |
| 95 | 95 | ] |
| 96 | 96 | ); |
| 97 | - $this->_logger->debug('Response body:',$response->getResponse()); |
|
| 97 | + $this->_logger->debug('Response body:', $response->getResponse()); |
|
| 98 | 98 | |
| 99 | 99 | return $response; |
| 100 | 100 | } |