Skip to content

Commit

Permalink
change return type
Browse files Browse the repository at this point in the history
  • Loading branch information
basz committed Sep 22, 2023
1 parent 411e61e commit 1206239
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Driver/AmqpExtension/Envelope.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/Driver/PhpAmqpLib/Envelope.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ public function getHeaders(): array
return [];
}

public function getHeader(string $header): ?string
public function getHeader(string $header)
{
$headers = $this->getHeaders();

Expand Down
4 changes: 2 additions & 2 deletions src/Envelope.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1206239

Please sign in to comment.