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