mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-09-03 19:24:59 +02:00
27 lines
543 B
PHP
27 lines
543 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Api\Sort;
|
|
|
|
use App\Enums\Http\Api\Sort\Direction;
|
|
use App\Http\Api\Criteria\Sort\RandomCriteria;
|
|
|
|
class RandomSort extends Sort
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct(RandomCriteria::PARAM_VALUE, RandomCriteria::PARAM_VALUE);
|
|
}
|
|
|
|
/**
|
|
* Format the sort based on direction.
|
|
*
|
|
* @noinspection PhpMissingParentCallCommonInspection
|
|
*/
|
|
public function format(Direction $direction): string
|
|
{
|
|
return $this->getKey();
|
|
}
|
|
}
|