Completed
Push — master ( 0cf701...e9a102 )
by claudio
06:37 queued 03:46
created
app/Http/Controllers/Employees/Calendars/CalendarsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
      */
18 18
     public function __construct()
19 19
     {
20
-        config(['auth.model' => \plunner\Employee::class]);
21
-        config(['jwt.user' => \plunner\Employee::class]);
20
+        config([ 'auth.model' => \plunner\Employee::class ]);
21
+        config([ 'jwt.user' => \plunner\Employee::class ]);
22 22
         $this->middleware('jwt.authandrefresh:mode-en');
23 23
     }
24 24
 
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         //
64 64
         $employee = \Auth::user();
65 65
         $calendar = $employee->calendars()->create($request->only('name', 'enabled'));
66
-        $calendar->caldav()->create($request->only('url','username', 'password', 'calendar_name'));
66
+        $calendar->caldav()->create($request->only('url', 'username', 'password', 'calendar_name'));
67 67
         //TODO test
68 68
         //TODO validator
69 69
         //TODO return caldav info
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         //TODO test
102 102
         //TODO validator
103 103
         //TODO check if caldav exists?
104
-        $calendar->caldav()->update($request->only('url','username', 'password', 'calendar_name'));
104
+        $calendar->caldav()->update($request->only('url', 'username', 'password', 'calendar_name'));
105 105
         return $calendar;
106 106
     }
107 107
 
@@ -134,9 +134,9 @@  discard block
 block discarded – undo
134 134
             $caldavClient->connect($request->input('url'), $request->input('username'), $request->input('password'));
135 135
             $calendars = $caldavClient->findCalendars();
136 136
             return array_keys($calendars);
137
-        }catch (\it\thecsea\caldav_client_adapter\CaldavException $e)
137
+        } catch (\it\thecsea\caldav_client_adapter\CaldavException $e)
138 138
         {
139
-            return Response::json(['error' => $e->getMessage()],422);
139
+            return Response::json([ 'error' => $e->getMessage() ], 422);
140 140
         }
141 141
     }
142 142
 }
Please login to merge, or discard this patch.