Increased MSI to 65%

This commit is contained in:
Alejandro Celaya
2018-11-17 19:23:25 +01:00
parent 6094d17718
commit 79b2a0839f
15 changed files with 227 additions and 17 deletions

View File

@@ -118,4 +118,12 @@ class Visit extends AbstractEntity implements JsonSerializable
'remoteAddr' => null,
];
}
/**
* @internal
*/
public function getDate(): Chronos
{
return $this->date;
}
}

View File

@@ -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));
}

View File

@@ -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);
}
}