mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Increased MSI to 65%
This commit is contained in:
@@ -118,4 +118,12 @@ class Visit extends AbstractEntity implements JsonSerializable
|
||||
'remoteAddr' => null,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
public function getDate(): Chronos
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ use function sprintf;
|
||||
|
||||
class InvalidShortCodeException extends RuntimeException
|
||||
{
|
||||
public static function fromCharset($shortCode, $charSet, Exception $previous = null)
|
||||
public static function fromCharset(string $shortCode, string $charSet, Exception $previous = null): self
|
||||
{
|
||||
$code = $previous !== null ? $previous->getCode() : -1;
|
||||
return new static(
|
||||
@@ -18,7 +18,7 @@ class InvalidShortCodeException extends RuntimeException
|
||||
);
|
||||
}
|
||||
|
||||
public static function fromNotFoundShortCode($shortCode)
|
||||
public static function fromNotFoundShortCode(string $shortCode): self
|
||||
{
|
||||
return new static(sprintf('Provided short code "%s" does not belong to a short URL', $shortCode));
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ class InvalidUrlException extends RuntimeException
|
||||
{
|
||||
public static function fromUrl($url, Throwable $previous = null)
|
||||
{
|
||||
$code = isset($previous) ? $previous->getCode() : -1;
|
||||
$code = $previous !== null ? $previous->getCode() : -1;
|
||||
return new static(sprintf('Provided URL "%s" is not an existing and valid URL', $url), $code, $previous);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user