update patch 1

This commit is contained in:
fiqhpratama
2024-12-02 01:18:34 +07:00
parent 453d9bb470
commit 25026b0a85
3380 changed files with 103529 additions and 363623 deletions
@@ -17,25 +17,21 @@ use Symfony\Component\HttpFoundation\Response;
final class ResponseHasCookie extends Constraint
{
private string $name;
private string $path;
private ?string $domain;
public function __construct(string $name, string $path = '/', ?string $domain = null)
{
$this->name = $name;
$this->path = $path;
$this->domain = $domain;
public function __construct(
private string $name,
private string $path = '/',
private ?string $domain = null,
) {
}
public function toString(): string
{
$str = sprintf('has cookie "%s"', $this->name);
$str = \sprintf('has cookie "%s"', $this->name);
if ('/' !== $this->path) {
$str .= sprintf(' with path "%s"', $this->path);
$str .= \sprintf(' with path "%s"', $this->path);
}
if ($this->domain) {
$str .= sprintf(' for domain "%s"', $this->domain);
$str .= \sprintf(' for domain "%s"', $this->domain);
}
return $str;