Completed
Push — develop ( 1c7ff0...b15f7e )
by Neil
08:15
created
app/Http/Controllers/NotificationController.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
     public function list_devices(Request $request) {
18 18
         if ($request->user()->level >= 10 || $request->user()->level == 5) {
19 19
             return Devices::all();
20
-        }
21
-        else {
20
+        } else {
22 21
             return User::find($request->user()->user_id)->devices()->get();
23 22
         }
24 23
     }
Please login to merge, or discard this patch.
app/Notification.php 2 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -42,6 +42,9 @@
 block discarded – undo
42 42
         $this->setAttrib('sticky', $enabled);
43 43
     }
44 44
 
45
+    /**
46
+     * @param string $name
47
+     */
45 48
     private function setAttrib($name, $enabled) {
46 49
         if ($enabled === true) {
47 50
             $read = new NotificationAttrib;
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@
 block discarded – undo
17 17
     public function list_devices(Request $request) {
18 18
         if ($request->user()->level >= 10 || $request->user()->level == 5) {
19 19
             return Devices::all();
20
-        }
21
-        else {
20
+        } else {
22 21
             return User::find($request->user()->user_id)->devices()->get();
23 22
         }
24 23
     }
Please login to merge, or discard this patch.
app/Api/Controllers/NotificationController.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@  discard block
 block discarded – undo
26 26
         if ($type === 'archive')
27 27
         {
28 28
             $notifications = Notification::IsArchived($request)->get();
29
-        }
30
-        else {
29
+        } else {
31 30
             $notifications = Notification::IsUnread()->get();
32 31
         }
33 32
         return $notifications;
@@ -44,15 +43,13 @@  discard block
 block discarded – undo
44 43
 
45 44
         if ($action == 'read') {
46 45
            $result = $notification->markRead($enable);
47
-        }
48
-        elseif ($action == 'sticky') {
46
+        } elseif ($action == 'sticky') {
49 47
            $result = $notification->markSticky(false);
50 48
         }
51 49
 
52 50
         if ($result === false) {
53 51
             return $this->response->errorInternal();
54
-        }
55
-        else {
52
+        } else {
56 53
             return $this->response->array(array('statusText'=>'OK'));
57 54
         }
58 55
     }
Please login to merge, or discard this patch.