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