diff --git a/src/Driver/AmqpExtension/Envelope.php b/src/Driver/AmqpExtension/Envelope.php index 702748a..40ca8a3 100644 --- a/src/Driver/AmqpExtension/Envelope.php +++ b/src/Driver/AmqpExtension/Envelope.php @@ -128,7 +128,7 @@ public function getHeaders(): array return $this->envelope->getHeaders(); } - public function getHeader(string $header): ?string + public function getHeader(string $header) { if (! $this->hasHeader($header)) { return null; diff --git a/src/Driver/PhpAmqpLib/Envelope.php b/src/Driver/PhpAmqpLib/Envelope.php index 6337f03..068378d 100644 --- a/src/Driver/PhpAmqpLib/Envelope.php +++ b/src/Driver/PhpAmqpLib/Envelope.php @@ -147,7 +147,7 @@ public function getHeaders(): array return []; } - public function getHeader(string $header): ?string + public function getHeader(string $header) { $headers = $this->getHeaders(); diff --git a/src/Envelope.php b/src/Envelope.php index 593c0bd..50b13b1 100644 --- a/src/Envelope.php +++ b/src/Envelope.php @@ -165,9 +165,9 @@ public function getHeaders(): array; * Get a specific message header. * * @param string $header Name of the header to get the value from. - * @return string|null The contents of the specified header, null if header not set + * @return mixed The contents of the specified header, null if header not set */ - public function getHeader(string $header): ?string; + public function getHeader(string $header); /** * Check whether a specific message header is set.