Fix errors
This commit is contained in:
parent
897df39d96
commit
430c5d9d4a
@ -9,14 +9,14 @@ class InvalidRequestArgumentException extends InvalidArgumentException
|
||||
{
|
||||
private $validateErrors;
|
||||
|
||||
public function __construct(string $message = "", int $code = 0, array $errors = [], Throwable $previous = null)
|
||||
public function __construct(string $message = "", int $code = 0, iterable $errors = [], Throwable $previous = null)
|
||||
{
|
||||
parent::__construct($message, $code, $previous);
|
||||
|
||||
$this->validateErrors = $errors;
|
||||
}
|
||||
|
||||
public function getValidateErrors(): array
|
||||
public function getValidateErrors(): iterable
|
||||
{
|
||||
return $this->validateErrors;
|
||||
}
|
||||
|
@ -4,9 +4,18 @@ namespace RetailCrm\ServiceBundle\Models;
|
||||
|
||||
class Error
|
||||
{
|
||||
public string $code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $code;
|
||||
|
||||
public string $message;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $message;
|
||||
|
||||
public array $details;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
public $details;
|
||||
}
|
||||
|
@ -15,11 +15,8 @@ abstract class AbstractClientAuthenticator extends AbstractAuthenticator
|
||||
{
|
||||
public const AUTH_FIELD = 'clientId';
|
||||
|
||||
private $errorResponseFactory;
|
||||
|
||||
public function __construct(ErrorJsonResponseFactory $errorResponseFactory)
|
||||
public function __construct(private ErrorJsonResponseFactory $errorResponseFactory)
|
||||
{
|
||||
$this->errorResponseFactory = $errorResponseFactory;
|
||||
}
|
||||
|
||||
abstract public function supports(Request $request): ?bool;
|
||||
|
@ -8,8 +8,9 @@ use JMS\Serializer\Annotation as JMS;
|
||||
class RequestDto
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
* @Assert\NotNull()
|
||||
* @JMS\Type("string")
|
||||
*/
|
||||
public string $param;
|
||||
public $param;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user