private static function fetchAll($query, $resultType = MYSQLI_ASSOC) { $res = self::$database->query($query); if (!$res) { return []; } return $res->fetch_all($resultType); }