mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 09:13:11 +08:00
Update to PHP coding standard 2.4.0
This commit is contained in:
@@ -13,7 +13,7 @@ class IpCannotBeLocatedException extends RuntimeException
|
||||
string $message,
|
||||
public readonly UnlocatableIpType $type,
|
||||
int $code = 0,
|
||||
?Throwable $previous = null,
|
||||
Throwable|null $previous = null,
|
||||
) {
|
||||
parent::__construct($message, $code, $previous);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class NonUniqueSlugException extends InvalidArgumentException implements Problem
|
||||
private const TITLE = 'Invalid custom slug';
|
||||
public const ERROR_CODE = 'non-unique-slug';
|
||||
|
||||
public static function fromSlug(string $slug, ?string $domain = null): self
|
||||
public static function fromSlug(string $slug, string|null $domain = null): self
|
||||
{
|
||||
$suffix = $domain === null ? '' : sprintf(' for domain "%s"', $domain);
|
||||
$e = new self(sprintf('Provided slug "%s" is already in use%s.', $slug, $suffix));
|
||||
|
||||
@@ -29,12 +29,12 @@ class ValidationException extends InvalidArgumentException implements ProblemDet
|
||||
/**
|
||||
* @param InputFilterInterface<mixed> $inputFilter
|
||||
*/
|
||||
public static function fromInputFilter(InputFilterInterface $inputFilter, ?Throwable $prev = null): self
|
||||
public static function fromInputFilter(InputFilterInterface $inputFilter, Throwable|null $prev = null): self
|
||||
{
|
||||
return static::fromArray($inputFilter->getMessages(), $prev);
|
||||
}
|
||||
|
||||
public static function fromArray(array $invalidData, ?Throwable $prev = null): self
|
||||
public static function fromArray(array $invalidData, Throwable|null $prev = null): self
|
||||
{
|
||||
$status = StatusCodeInterface::STATUS_BAD_REQUEST;
|
||||
$e = new self('Provided data is not valid', $status, $prev);
|
||||
|
||||
Reference in New Issue
Block a user