mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 17:23:12 +08:00
Added nullsafe operator to simplify conditions
This commit is contained in:
@@ -49,9 +49,9 @@ class VisitsStatsHelper implements VisitsStatsHelperInterface
|
||||
public function visitsForShortUrl(
|
||||
ShortUrlIdentifier $identifier,
|
||||
VisitsParams $params,
|
||||
?ApiKey $apiKey = null
|
||||
?ApiKey $apiKey = null,
|
||||
): Paginator {
|
||||
$spec = $apiKey !== null ? $apiKey->spec() : null;
|
||||
$spec = $apiKey?->spec();
|
||||
|
||||
/** @var ShortUrlRepositoryInterface $repo */
|
||||
$repo = $this->em->getRepository(ShortUrl::class);
|
||||
|
||||
Reference in New Issue
Block a user