2018-09-15 11:01:23 +02:00
|
|
|
<?php
|
2019-10-05 17:26:10 +02:00
|
|
|
|
2018-09-15 11:01:23 +02:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace Shlinkio\Shlink;
|
|
|
|
|
2022-01-20 20:16:37 +01:00
|
|
|
use Shlinkio\Shlink\Core\Config\EnvVars;
|
2021-08-07 11:05:20 +02:00
|
|
|
|
2021-12-18 18:17:45 +01:00
|
|
|
return (static function (): array {
|
2022-04-23 12:44:17 +02:00
|
|
|
$threshold = EnvVars::DELETE_SHORT_URL_THRESHOLD->loadFromEnv();
|
2021-08-07 11:05:20 +02:00
|
|
|
|
2021-12-18 18:17:45 +01:00
|
|
|
return [
|
2018-09-15 11:01:23 +02:00
|
|
|
|
2021-12-18 18:17:45 +01:00
|
|
|
'delete_short_urls' => [
|
|
|
|
'check_visits_threshold' => $threshold !== null,
|
|
|
|
'visits_threshold' => (int) ($threshold ?? DEFAULT_DELETE_SHORT_URL_THRESHOLD),
|
|
|
|
],
|
2018-09-15 11:01:23 +02:00
|
|
|
|
2021-12-18 18:17:45 +01:00
|
|
|
];
|
|
|
|
})();
|