Skip to content

Commit

Permalink
Add param type null and fix phpdoc return type
Browse files Browse the repository at this point in the history
  • Loading branch information
DikoIbragimov committed Dec 13, 2024
1 parent cf61968 commit 92d3b3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/RequestHeaders.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ public function __construct(
* @param string $name The name of the header to retrieve.
* @return string|null The header value as a string, or null if the header is not present.
*/
public function getHeaderLine(string $name, string $default = null): string|null {
public function getHeaderLine(string $name, string|null $default = null): string|null {
return $this->requestProvider->get()->hasHeader($name) ? $this->requestProvider->get()->getHeaderLine($name) : $default;
}

/**
* Retrieves the value(s) of a specific header as an array.
*
* @param string $name The name of the header to retrieve.
* @return array An array of header values, or an empty array if the header is not present.
* @return string[] An array of header values, or an empty array if the header is not present.
*/
public function getHeader(string $name): array {
return $this->requestProvider->get()->getHeader($name);
Expand Down

0 comments on commit 92d3b3b

Please sign in to comment.