From 054eb426136f02a8a26730161912953c81bc916d Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Tue, 26 Mar 2024 09:06:47 +0100 Subject: [PATCH] Remove no-longer used methods in OrderableField enum --- composer.json | 4 ++++ module/Core/src/ShortUrl/Model/OrderableField.php | 15 --------------- 2 files changed, 4 insertions(+), 15 deletions(-) diff --git a/composer.json b/composer.json index a35dd727..2179a749 100644 --- a/composer.json +++ b/composer.json @@ -129,6 +129,10 @@ "test:db:postgres": "DB_DRIVER=postgres composer test:db:sqlite", "test:db:ms": "DB_DRIVER=mssql composer test:db:sqlite", "test:api": "bin/test/run-api-tests.sh", + "test:api:sqlite": "DB_DRIVER=sqlite composer test:api", + "test:api:mysql": "DB_DRIVER=mysql composer test:api", + "test:api:maria": "DB_DRIVER=maria composer test:api", + "test:api:mssql": "DB_DRIVER=mssql composer test:api", "test:api:ci": "GENERATE_COVERAGE=yes composer test:api && vendor/bin/phpcov merge build/coverage-api --php build/coverage-api.cov && rm build/coverage-api/*.cov", "test:api:pretty": "GENERATE_COVERAGE=yes composer test:api && vendor/bin/phpcov merge build/coverage-api --html build/coverage-api/coverage-html && rm build/coverage-api/*.cov", "test:cli": "APP_ENV=test DB_DRIVER=maria TEST_ENV=cli php vendor/bin/phpunit --order-by=random --colors=always --testdox -c phpunit-cli.xml", diff --git a/module/Core/src/ShortUrl/Model/OrderableField.php b/module/Core/src/ShortUrl/Model/OrderableField.php index 685f6f12..a4053742 100644 --- a/module/Core/src/ShortUrl/Model/OrderableField.php +++ b/module/Core/src/ShortUrl/Model/OrderableField.php @@ -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; - } }