mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 01:03:13 +08:00
Update to PHPStan 2.0
This commit is contained in:
@@ -22,7 +22,7 @@ class CreateShortUrlCommand extends Command
|
||||
{
|
||||
public const NAME = 'short-url:create';
|
||||
|
||||
private SymfonyStyle|null $io;
|
||||
private SymfonyStyle $io;
|
||||
private readonly ShortUrlDataInput $shortUrlDataInput;
|
||||
|
||||
public function __construct(
|
||||
|
||||
@@ -235,7 +235,7 @@ class ListShortUrlsCommand extends Command
|
||||
}
|
||||
if ($input->getOption('show-domain')) {
|
||||
$columnsMap['Domain'] = static fn (array $_, ShortUrl $shortUrl): string =>
|
||||
$shortUrl->getDomain()?->authority ?? Domain::DEFAULT_AUTHORITY;
|
||||
$shortUrl->getDomain()->authority ?? Domain::DEFAULT_AUTHORITY;
|
||||
}
|
||||
if ($input->getOption('show-api-key') || $input->getOption('show-api-key-name')) {
|
||||
$columnsMap['API Key Name'] = static fn (array $_, ShortUrl $shortUrl): string|null =>
|
||||
|
||||
@@ -61,8 +61,8 @@ abstract class AbstractVisitsListCommand extends Command
|
||||
'date' => $visit->date->toAtomString(),
|
||||
'userAgent' => $visit->userAgent,
|
||||
'potentialBot' => $visit->potentialBot,
|
||||
'country' => $visit->getVisitLocation()?->countryName ?? 'Unknown',
|
||||
'city' => $visit->getVisitLocation()?->cityName ?? 'Unknown',
|
||||
'country' => $visit->getVisitLocation()->countryName ?? 'Unknown',
|
||||
'city' => $visit->getVisitLocation()->cityName ?? 'Unknown',
|
||||
...$extraFields,
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user