query = $query; } //findLatests public function getLatests(int $maxResults = 0, $query = null): array { if (is_null($query)) { $query = $this->query->create(); } $query ->filterIsOnline() ->orderBy('.date', 'DESC'); if ($maxResults) { $query ->limit($maxResults); } return $query->find(); } }