Remove no-longer used methods in OrderableField enum

This commit is contained in:
Alejandro Celaya
2024-03-26 09:06:47 +01:00
parent 6074f4475d
commit 054eb42613
2 changed files with 4 additions and 15 deletions

View File

@@ -2,8 +2,6 @@
namespace Shlinkio\Shlink\Core\ShortUrl\Model;
use function Shlinkio\Shlink\Core\ArrayUtils\contains;
enum OrderableField: string
{
case LONG_URL = 'longUrl';
@@ -12,17 +10,4 @@ enum OrderableField: string
case TITLE = 'title';
case VISITS = 'visits';
case NON_BOT_VISITS = 'nonBotVisits';
public static function isBasicField(string $value): bool
{
return contains(
$value,
[self::LONG_URL->value, self::SHORT_CODE->value, self::DATE_CREATED->value, self::TITLE->value],
);
}
public static function isVisitsField(string $value): bool
{
return $value === self::VISITS->value || $value === self::NON_BOT_VISITS->value;
}
}