protected function enforceOrderBy() { if (empty($this->orders) && empty($this->unionOrders)) { throw new RuntimeException('You must specify an orderBy clause when using this function.'); } }