mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-14 12:11:19 +03:00
Remove no-longer used methods in OrderableField enum
This commit is contained in:
parent
6074f4475d
commit
054eb42613
2 changed files with 4 additions and 15 deletions
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue