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