fix:更新已知bug,优化代码
This commit is contained in:
@@ -16,8 +16,8 @@ use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
final class RequestAttributeValueSame extends Constraint
|
||||
{
|
||||
private $name;
|
||||
private $value;
|
||||
private string $name;
|
||||
private string $value;
|
||||
|
||||
public function __construct(string $name, string $value)
|
||||
{
|
||||
|
||||
@@ -17,10 +17,10 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
final class ResponseCookieValueSame extends Constraint
|
||||
{
|
||||
private $name;
|
||||
private $value;
|
||||
private $path;
|
||||
private $domain;
|
||||
private string $name;
|
||||
private string $value;
|
||||
private string $path;
|
||||
private ?string $domain;
|
||||
|
||||
public function __construct(string $name, string $value, string $path = '/', string $domain = null)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
final class ResponseFormatSame extends Constraint
|
||||
{
|
||||
private $request;
|
||||
private $format;
|
||||
private ?string $format;
|
||||
|
||||
public function __construct(Request $request, ?string $format)
|
||||
{
|
||||
|
||||
@@ -17,9 +17,9 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
final class ResponseHasCookie extends Constraint
|
||||
{
|
||||
private $name;
|
||||
private $path;
|
||||
private $domain;
|
||||
private string $name;
|
||||
private string $path;
|
||||
private ?string $domain;
|
||||
|
||||
public function __construct(string $name, string $path = '/', string $domain = null)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
final class ResponseHasHeader extends Constraint
|
||||
{
|
||||
private $headerName;
|
||||
private string $headerName;
|
||||
|
||||
public function __construct(string $headerName)
|
||||
{
|
||||
|
||||
@@ -16,8 +16,8 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
final class ResponseHeaderSame extends Constraint
|
||||
{
|
||||
private $headerName;
|
||||
private $expectedValue;
|
||||
private string $headerName;
|
||||
private string $expectedValue;
|
||||
|
||||
public function __construct(string $headerName, string $expectedValue)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
final class ResponseStatusCodeSame extends Constraint
|
||||
{
|
||||
private $statusCode;
|
||||
private int $statusCode;
|
||||
|
||||
public function __construct(int $statusCode)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user