query->create(); } if ($this->merchant) { $query->filterByMerchant($this->merchant); } return parent::getByUser($user, $query); } public function getAllOpen(int $limit = 0, $query = null): array { if (is_null($query)) { $query = $this->query->create(); } if ($this->merchant) { $query->filterByMerchant($this->merchant); } return parent::getAllOpen($limit, $query); } public function countAllOpen($query = null): string { if (is_null($query)) { $query = $this->query->create(); } if ($this->merchant) { $query->filterByMerchant($this->merchant); } return parent::countAllOpen($query); } }