This repository was archived by the owner on Dec 31, 2022. It is now read-only.

Description
As title, please consider the following sample code firstly:
public function withCookieParams(array $cookieParams) : ServerRequestInterface
{
$clone = clone $this;
$clone->cookieParams = $cookieParams;
return $clone;
}
How about using the following code?
public function withCookieParams(array $cookieParams) : ServerRequestInterface
{
$this->cookieParams = $cookieParams;
return $this;
}
I think using the clone to clone $this instance is not necessary because it should override the methods/attributes on $this class instance.