createBody($qrCode), $status, $this->injectContentType($qrCode->getContentType(), $headers) ); } /** * Create the message body. * * @param QrCode $qrCode * @return StreamInterface */ private function createBody(QrCode $qrCode) { $body = new Stream('php://temp', 'wb+'); $body->write($qrCode->get()); $body->rewind(); return $body; } }