@@ -17,8 +17,8 @@ discard block |
||
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 | |
@@ -102,14 +102,14 @@ discard block |
||
102 | 102 | $this->authorize($calendar); |
103 | 103 | $input = $request->all(); |
104 | 104 | $caldav = $calendar->caldav; |
105 | - if($caldav) |
|
105 | + if ($caldav) |
|
106 | 106 | $this->validateCaldav($request); |
107 | 107 | $calendar->update($input); |
108 | 108 | //TODO test |
109 | 109 | //TODO validator |
110 | 110 | //TODO check if caldav exists? |
111 | 111 | |
112 | - if($caldav) |
|
112 | + if ($caldav) |
|
113 | 113 | $caldav->update($input); |
114 | 114 | return $calendar; |
115 | 115 | } |
@@ -143,9 +143,9 @@ discard block |
||
143 | 143 | $caldavClient->connect($request->input('url'), $request->input('username'), $request->input('password')); |
144 | 144 | $calendars = $caldavClient->findCalendars(); |
145 | 145 | return array_keys($calendars); |
146 | - }catch (\it\thecsea\caldav_client_adapter\CaldavException $e) |
|
146 | + } catch (\it\thecsea\caldav_client_adapter\CaldavException $e) |
|
147 | 147 | { |
148 | - return Response::json(['error' => $e->getMessage()],422); |
|
148 | + return Response::json([ 'error' => $e->getMessage() ], 422); |
|
149 | 149 | } |
150 | 150 | } |
151 | 151 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $this->validate($request, [ |
158 | 158 | 'url' => 'required|max:255', |
159 | 159 | 'username' => 'required|max:255', |
160 | - 'password' => ((\Route::current()->getName() == 'companies.calendars.caldav')?'required':''), |
|
160 | + 'password' => ((\Route::current()->getName() == 'companies.calendars.caldav') ? 'required' : ''), |
|
161 | 161 | 'calendar_name' => 'required|max:255', |
162 | 162 | ]); |
163 | 163 | } |