File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -275,23 +275,21 @@ public function deleteNotificationsAction(Request $request): Response
275
275
if ($ form ->isValid ()) {
276
276
$ result = $ this ->submitHandler ->handle (
277
277
$ form ,
278
- function (NotificationSelectionData $ data ) {
278
+ function (NotificationSelectionData $ data ): Response {
279
279
return $ this ->processDeleteNotifications ($ data );
280
280
}
281
281
);
282
282
283
- if ($ result instanceof Response) {
284
- return $ result ;
285
- }
286
- } else {
287
- $ this ->notificationHandler ->error (
288
- /** @Desc("An unexpected error occurred while deleting notifications.") */
289
- 'error.unexpected_delete_notifications ' ,
290
- [],
291
- 'ibexa_notifications '
292
- );
283
+ return $ result ?? $ this ->redirectToRoute ('ibexa.notifications.render.all ' );
293
284
}
294
285
286
+ $ this ->notificationHandler ->error (
287
+ /** @Desc("An unexpected error occurred while deleting notifications.") */
288
+ 'error.unexpected_delete_notifications ' ,
289
+ [],
290
+ 'ibexa_notifications '
291
+ );
292
+
295
293
return $ this ->redirectToRoute ('ibexa.notifications.render.all ' );
296
294
}
297
295
You can’t perform that action at this time.
0 commit comments