| @@ -55,9 +55,9 @@ | ||
| 55 | 55 | * sensitive data to what the scrubbed value should be. The value of any |
| 56 | 56 | * headers contained in this array will be replaced with the if |
| 57 | 57 | * "scrub_auth" is set to true. |
| 58 | 58 | */ |
| 59 | - public function __construct(array $config = [], Service $service = null) | |
| 59 | + public function __construct(array $config = [], ?Service $service = null) | |
| 60 | 60 | { |
| 61 | 61 | $this->config = $config + ['logfn' => function ($value) { |
| 62 | 62 | echo $value; |
| 63 | 63 | }, 'stream_size' => 524288, 'scrub_auth' => \true, 'http' => \true, 'auth_strings' => [], 'auth_headers' => []]; |
| @@ -120,9 +120,9 @@ | ||
| 120 | 120 | private function requestArray($request = null) |
| 121 | 121 | { |
| 122 | 122 | return !$request instanceof RequestInterface ? [] : \array_filter(['instance' => \spl_object_hash($request), 'method' => $request->getMethod(), 'headers' => $this->redactHeaders($request->getHeaders()), 'body' => $this->streamStr($request->getBody()), 'scheme' => $request->getUri()->getScheme(), 'port' => $request->getUri()->getPort(), 'path' => $request->getUri()->getPath(), 'query' => $request->getUri()->getQuery()]); |
| 123 | 123 | } |
| 124 | - private function responseArray(ResponseInterface $response = null) | |
| 124 | + private function responseArray(?ResponseInterface $response = null) | |
| 125 | 125 | { |
| 126 | 126 | return !$response ? [] : ['instance' => \spl_object_hash($response), 'statusCode' => $response->getStatusCode(), 'headers' => $this->redactHeaders($response->getHeaders()), 'body' => $this->streamStr($response->getBody())]; |
| 127 | 127 | } |
| 128 | 128 | private function resultArray($value) |