Fix PHPStan rules

This commit is contained in:
Alejandro Celaya 2024-10-27 12:33:15 +01:00
parent bf121c58ba
commit af569ad7a5
2 changed files with 2 additions and 2 deletions

View File

@ -265,7 +265,7 @@ class ShortUrl extends AbstractEntity
}
/**
* @param null|(callable(): string|null) $getAuthority -
* @param null|(callable(): ?string) $getAuthority -
* This is a callback so that we trust its return value if provided, even if it is null.
* Providing the raw authority as `string|null` would result in a fallback to `$this->domain` when the authority
* was null.

View File

@ -56,7 +56,7 @@ class ShortUrlListRepository extends EntitySpecificationRepository implements Sh
$this->processOrderByForList($qb, $filtering);
/** @var array{shortUrl: ShortUrl, visits: string, nonBotVisits: string}[] $result */
/** @var array{shortUrl: ShortUrl, visits: string, nonBotVisits: string, authority: string|null}[] $result */
$result = $qb->getQuery()->getResult();
return map($result, static fn (array $s) => ShortUrlWithVisitsSummary::fromArray($s));
}