<?php

namespace App\Modules\Shared\Domain\Storage\Criteria;

use App\Modules\Shared\Domain\ValueObject\StringValueObject;
use InvalidArgumentException;

final class OrderBy extends StringValueObject
{
    public const ASC  = 'asc';
    public const DESC = 'desc';

    protected function throwExceptionForInvalidValue($value): void
    {
        throw new InvalidArgumentException($value);
    }

    public static function values(): array
    {
        return [self::ASC, self::DESC];
    }
}
