for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types = 1);
namespace TBolier\RethinkQL\Query;
use TBolier\RethinkQL\Message\MessageInterface;
use TBolier\RethinkQL\RethinkInterface;
use TBolier\RethinkQL\Types\Term\TermType;
class Ordening extends AbstractQuery implements OrdeningInterface
{
/**
* @var array
*/
private $query;
* @param string $key
* @param RethinkInterface $rethink
* @param MessageInterface $message
public function __construct(string $key, RethinkInterface $rethink, MessageInterface $message)
parent::__construct($rethink, $message);
$this->asc($key);
}
* @inheritdoc
public function asc(string $key): OrdeningInterface
$this->query = [
TermType::ASC,
[
$key,
],
];
return $this;
public function desc(string $key): OrdeningInterface
TermType::DESC,
public function toArray(): array
return $this->query;