mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-06 23:33:13 +08:00
Fix incorrect timeout in init commands
This commit is contained in:
@@ -23,8 +23,8 @@ class ProcessRunner implements ProcessRunnerInterface
|
||||
public function __construct(private ProcessHelper $helper, ?callable $createProcess = null)
|
||||
{
|
||||
$this->createProcess = $createProcess !== null
|
||||
? Closure::fromCallable($createProcess)
|
||||
: static fn (array $cmd) => new Process($cmd, null, null, null, LockedCommandConfig::DEFAULT_TTL);
|
||||
? $createProcess(...)
|
||||
: static fn (array $cmd) => new Process($cmd, timeout: LockedCommandConfig::DEFAULT_TTL);
|
||||
}
|
||||
|
||||
public function run(OutputInterface $output, array $cmd): void
|
||||
|
||||
@@ -12,7 +12,7 @@ enum DeviceType: string
|
||||
|
||||
public static function matchFromUserAgent(string $userAgent): ?self
|
||||
{
|
||||
$detect = new MobileDetect(null, $userAgent); // @phpstan-ignore-line
|
||||
$detect = new MobileDetect(userAgent: $userAgent); // @phpstan-ignore-line
|
||||
|
||||
return match (true) {
|
||||
// $detect->is('iOS') && $detect->isTablet() => self::IOS, // TODO To detect iPad only
|
||||
|
||||
@@ -40,7 +40,7 @@ class ListTagsAction extends AbstractRestAction
|
||||
|
||||
// This part is deprecated. To get tags with stats, the /tags/stats endpoint should be used instead
|
||||
$tagsInfo = $this->tagService->tagsInfo($params, $apiKey);
|
||||
$rawTags = $this->serializePaginator($tagsInfo, null, 'stats');
|
||||
$rawTags = $this->serializePaginator($tagsInfo, dataProp: 'stats');
|
||||
$rawTags['data'] = map($tagsInfo, static fn (TagInfo $info) => $info->tag);
|
||||
|
||||
return new JsonResponse(['tags' => $rawTags]);
|
||||
|
||||
Reference in New Issue
Block a user