Skip to content

Commit 74fbf16

Browse files
authored
Fixed test cases (#7643)
1 parent 9309ed4 commit 74fbf16

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/Cookie/Cookie.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function __construct(
9494
*
9595
* @return string The cookie
9696
*/
97-
public function __toString()
97+
public function __toString(): string
9898
{
9999
$str = ($this->isRaw() ? $this->getName() : urlencode($this->getName())) . '=';
100100

src/Cookie/SetCookie.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function __construct(array $data = [])
5252
}
5353
}
5454

55-
public function __toString()
55+
public function __toString(): string
5656
{
5757
$str = $this->data['Name'] . '=' . $this->data['Value'] . '; ';
5858
foreach ($this->data as $k => $v) {

src/Stream/StandardStream.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use InvalidArgumentException;
1717
use Psr\Http\Message\StreamInterface;
1818
use RuntimeException;
19+
use Stringable;
1920

2021
use function clearstatcache;
2122
use function fclose;
@@ -42,7 +43,7 @@
4243
* Author: Martijn van der Ven <martijn@vanderven.se>.
4344
* @license https://github.com/Nyholm/psr7/blob/master/LICENSE
4445
*/
45-
final class StandardStream implements StreamInterface
46+
final class StandardStream implements Stringable, StreamInterface
4647
{
4748
/** @var array Hash of readable and writable stream types */
4849
private const READ_WRITE_HASH = [

0 commit comments

Comments
 (0)