@@ -27,8 +27,7 @@ discard block |
||
| 27 | 27 | if ($type === 'archive') |
| 28 | 28 | { |
| 29 | 29 | $notifications = Notification::IsArchived($request)->get(); |
| 30 | - } |
|
| 31 | - else { |
|
| 30 | + } else { |
|
| 32 | 31 | $notifications = Notification::IsUnread()->get(); |
| 33 | 32 | } |
| 34 | 33 | return $notifications; |
@@ -45,15 +44,13 @@ discard block |
||
| 45 | 44 | |
| 46 | 45 | if ($action == 'read') { |
| 47 | 46 | $result = $notification->markRead($enable); |
| 48 | - } |
|
| 49 | - elseif ($action == 'sticky') { |
|
| 47 | + } elseif ($action == 'sticky') { |
|
| 50 | 48 | $result = $notification->markSticky(false); |
| 51 | 49 | } |
| 52 | 50 | |
| 53 | 51 | if ($result === false) { |
| 54 | 52 | return $this->response->errorInternal(); |
| 55 | - } |
|
| 56 | - else { |
|
| 53 | + } else { |
|
| 57 | 54 | return $this->response->array(array('statusText' => 'OK')); |
| 58 | 55 | } |
| 59 | 56 | } |
@@ -73,8 +70,7 @@ discard block |
||
| 73 | 70 | if ($notification->save()) |
| 74 | 71 | { |
| 75 | 72 | return $this->response->array(array('statusText' => 'OK')); |
| 76 | - } |
|
| 77 | - else { |
|
| 73 | + } else { |
|
| 78 | 74 | return $this->response->errorInternal(); |
| 79 | 75 | } |
| 80 | 76 | } |