by = $by; $this->direction = $direction; $this->properties = $properties; } public function es(): array { return array_merge([$this->by->key() => $this->direction::getType()], $this->properties); } public function orderBy(): Type { return $this->by; } public function orderType(): OrderType { return $this->direction; } public function orderProperties(): array { return $this->properties; } }