diff --git a/src/Endpoint/ContainerAttachWebsocket.php b/src/Endpoint/ContainerAttachWebsocket.php index 6009f415..ee6fe023 100644 --- a/src/Endpoint/ContainerAttachWebsocket.php +++ b/src/Endpoint/ContainerAttachWebsocket.php @@ -27,7 +27,8 @@ public function getExtraHeaders(): array ); } - protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, string $contentType = null) + protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string + $contentType = null) { if (200 === $response->getStatusCode() && DockerRawStream::HEADER === $contentType) { return new AttachWebsocketStream($response->getBody()); diff --git a/src/Endpoint/ContainerLogs.php b/src/Endpoint/ContainerLogs.php index 573ae648..996b09c3 100644 --- a/src/Endpoint/ContainerLogs.php +++ b/src/Endpoint/ContainerLogs.php @@ -11,7 +11,7 @@ class ContainerLogs extends BaseEndpoint { - protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, string $contentType = null) + protected function transformResponseBody(ResponseInterface $response, SerializerInterface $serializer, ?string $contentType = null) { if (200 === $response->getStatusCode() && DockerRawStream::HEADER === $contentType) { return new DockerRawStream($response->getBody());