@@ -59,7 +59,7 @@ public function count(INotification $notification): int {
5959 $ this ->sqlWhere ($ sql , $ notification );
6060
6161 $ statement = $ sql ->executeQuery ();
62- $ count = (int ) $ statement ->fetchOne ();
62+ $ count = (int )$ statement ->fetchOne ();
6363 $ statement ->closeCursor ();
6464
6565 return $ count ;
@@ -87,10 +87,10 @@ public function delete(INotification $notification): array {
8787 }
8888
8989 $ deleted [$ row ['user ' ]][] = [
90- 'id ' => (int ) $ row ['notification_id ' ],
90+ 'id ' => (int )$ row ['notification_id ' ],
9191 'app ' => $ row ['app ' ],
9292 ];
93- $ notifications [(int ) $ row ['notification_id ' ]] = $ this ->notificationFromRow ($ row );
93+ $ notifications [(int )$ row ['notification_id ' ]] = $ this ->notificationFromRow ($ row );
9494 }
9595 $ statement ->closeCursor ();
9696
@@ -159,7 +159,7 @@ public function deleteById(int $id, string $user, ?INotification $notification =
159159 $ sql ->delete ('notifications ' )
160160 ->where ($ sql ->expr ()->eq ('notification_id ' , $ sql ->createNamedParameter ($ id )))
161161 ->andWhere ($ sql ->expr ()->eq ('user ' , $ sql ->createNamedParameter ($ user )));
162- return (bool ) $ sql ->executeStatement ();
162+ return (bool )$ sql ->executeStatement ();
163163 }
164164
165165 /**
@@ -220,7 +220,7 @@ public function confirmIdsForUser(string $user, array $ids): array {
220220
221221 $ existing = [];
222222 while ($ row = $ result ->fetch ()) {
223- $ existing [] = (int ) $ row ['notification_id ' ];
223+ $ existing [] = (int )$ row ['notification_id ' ];
224224 }
225225 $ result ->closeCursor ();
226226
@@ -366,17 +366,17 @@ protected function sqlInsert(IQueryBuilder $sql, INotification $notification) {
366366 */
367367 protected function notificationFromRow (array $ row ): INotification {
368368 $ dateTime = new \DateTime ();
369- $ dateTime ->setTimestamp ((int ) $ row ['timestamp ' ]);
369+ $ dateTime ->setTimestamp ((int )$ row ['timestamp ' ]);
370370
371371 $ notification = $ this ->manager ->createNotification ();
372372 $ notification ->setApp ($ row ['app ' ])
373373 ->setUser ($ row ['user ' ])
374374 ->setDateTime ($ dateTime )
375375 ->setObject ($ row ['object_type ' ], $ row ['object_id ' ])
376- ->setSubject ($ row ['subject ' ], (array ) json_decode ($ row ['subject_parameters ' ], true ));
376+ ->setSubject ($ row ['subject ' ], (array )json_decode ($ row ['subject_parameters ' ], true ));
377377
378378 if ($ row ['message ' ] !== '' && $ row ['message ' ] !== null ) {
379- $ notification ->setMessage ($ row ['message ' ], (array ) json_decode ($ row ['message_parameters ' ], true ));
379+ $ notification ->setMessage ($ row ['message ' ], (array )json_decode ($ row ['message_parameters ' ], true ));
380380 }
381381 if ($ row ['link ' ] !== '' && $ row ['link ' ] !== null ) {
382382 $ notification ->setLink ($ row ['link ' ]);
@@ -385,7 +385,7 @@ protected function notificationFromRow(array $row): INotification {
385385 $ notification ->setIcon ($ row ['icon ' ]);
386386 }
387387
388- $ actions = (array ) json_decode ($ row ['actions ' ], true );
388+ $ actions = (array )json_decode ($ row ['actions ' ], true );
389389 foreach ($ actions as $ actionData ) {
390390 $ action = $ notification ->createAction ();
391391 $ action ->setLabel ($ actionData ['label ' ])
0 commit comments