update patch 1
This commit is contained in:
+10
-16
@@ -17,31 +17,25 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
final class ResponseCookieValueSame extends Constraint
|
||||
{
|
||||
private string $name;
|
||||
private string $value;
|
||||
private string $path;
|
||||
private ?string $domain;
|
||||
|
||||
public function __construct(string $name, string $value, string $path = '/', ?string $domain = null)
|
||||
{
|
||||
$this->name = $name;
|
||||
$this->value = $value;
|
||||
$this->path = $path;
|
||||
$this->domain = $domain;
|
||||
public function __construct(
|
||||
private string $name,
|
||||
private string $value,
|
||||
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);
|
||||
}
|
||||
$str .= sprintf(' with value "%s"', $this->value);
|
||||
|
||||
return $str;
|
||||
return $str.\sprintf(' with value "%s"', $this->value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user