🔧
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Symfony\Component\Translation\Exception;
|
||||
|
||||
class IncompleteDsnException extends InvalidArgumentException
|
||||
{
|
||||
public function __construct(string $message, string $dsn = null, \Throwable $previous = null)
|
||||
public function __construct(string $message, ?string $dsn = null, ?\Throwable $previous = null)
|
||||
{
|
||||
if ($dsn) {
|
||||
$message = sprintf('Invalid "%s" provider DSN: ', $dsn).$message;
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace Symfony\Component\Translation\Exception;
|
||||
*/
|
||||
class MissingRequiredOptionException extends IncompleteDsnException
|
||||
{
|
||||
public function __construct(string $option, string $dsn = null, \Throwable $previous = null)
|
||||
public function __construct(string $option, ?string $dsn = null, ?\Throwable $previous = null)
|
||||
{
|
||||
$message = sprintf('The option "%s" is required but missing.', $option);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ class ProviderException extends RuntimeException implements ProviderExceptionInt
|
||||
private ResponseInterface $response;
|
||||
private string $debug;
|
||||
|
||||
public function __construct(string $message, ResponseInterface $response, int $code = 0, \Exception $previous = null)
|
||||
public function __construct(string $message, ResponseInterface $response, int $code = 0, ?\Exception $previous = null)
|
||||
{
|
||||
$this->response = $response;
|
||||
$this->debug = $response->getInfo('debug') ?? '';
|
||||
|
||||
@@ -35,7 +35,7 @@ class UnsupportedSchemeException extends LogicException
|
||||
],
|
||||
];
|
||||
|
||||
public function __construct(Dsn $dsn, string $name = null, array $supported = [])
|
||||
public function __construct(Dsn $dsn, ?string $name = null, array $supported = [])
|
||||
{
|
||||
$provider = $dsn->getScheme();
|
||||
if (false !== $pos = strpos($provider, '+')) {
|
||||
|
||||
Reference in New Issue
Block a user