Skip to content

Commit db70d8c

Browse files
author
Paul M. Jones
committed
Merge pull request #28 from evert/patch-1
Document return values for non-existant headers
2 parents 83826b6 + ef85817 commit db70d8c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/MessageInterface.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,20 @@ public function hasHeader($name);
8686
* NOTE: Not all header values may be appropriately represented using
8787
* comma concatenation. For such headers, use getHeaderLines() instead
8888
* and supply your own delimiter when concatenating.
89+
*
90+
* If the header did not appear in the message, this method should return
91+
* a null value.
8992
*
9093
* @param string $name Case-insensitive header field name.
91-
* @return string
94+
* @return string|null
9295
*/
9396
public function getHeader($name);
9497

9598
/**
9699
* Retrieves a header by the given case-insensitive name as an array of strings.
100+
*
101+
* If the header did not appear in the message, this method should return an
102+
* empty array.
97103
*
98104
* @param string $name Case-insensitive header field name.
99105
* @return string[]

0 commit comments

Comments
 (0)