Completed
Push — master ( 113f7a...a92f31 )
by claudio
08:47
created
app/Http/Controllers/Employees/Planners/MeetingTimeslotsController.php 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -33,8 +33,9 @@  discard block
 block discarded – undo
33 33
         $meeting = Meeting::findOrFail($meetingId);
34 34
         $this->authorize($meeting);
35 35
 
36
-        if ($meeting->group_id == $groupId)
37
-            return $meeting->timeslots;
36
+        if ($meeting->group_id == $groupId) {
37
+                    return $meeting->timeslots;
38
+        }
38 39
         return Response::json(['error' => 'meeting->group_id <> groupId'], 403);
39 40
     }
40 41
 
@@ -55,8 +56,9 @@  discard block
 block discarded – undo
55 56
         $timeslot = MeetingTimeslot::findOrFail($timeslotId);
56 57
         $this->authorize($timeslot);
57 58
 
58
-        if ($meeting->group_id == $groupId && $timeslot->meeting_id == $meetingId)
59
-            return $timeslot;
59
+        if ($meeting->group_id == $groupId && $timeslot->meeting_id == $meetingId) {
60
+                    return $timeslot;
61
+        }
60 62
         return Response::json(['error' => 'meeting->group_id <> groupId || timeslot->meeting_id <> meetingId'], 403);
61 63
     }
62 64
 
@@ -72,8 +74,9 @@  discard block
 block discarded – undo
72 74
         $this->authorize($group);
73 75
         $meeting = Meeting::findOrFail($meetingId);
74 76
         $this->authorize($meeting);
75
-        if ($meeting->start_time != NULL)
76
-            return Response::json(['error' => 'the meeting is already planned'], 422);
77
+        if ($meeting->start_time != NULL) {
78
+                    return Response::json(['error' => 'the meeting is already planned'], 422);
79
+        }
77 80
 
78 81
         $input = $request->all();
79 82
 
@@ -96,8 +99,9 @@  discard block
 block discarded – undo
96 99
         $this->authorize($group);
97 100
         $meeting = Meeting::findOrFail($meetingId);
98 101
         $this->authorize($meeting);
99
-        if ($meeting->start_time != NULL)
100
-            return Response::json(['error' => 'the meeting is already planned'], 422);
102
+        if ($meeting->start_time != NULL) {
103
+                    return Response::json(['error' => 'the meeting is already planned'], 422);
104
+        }
101 105
         $timeslot = MeetingTimeslot::findOrFail($timeslotId);
102 106
         $this->authorize($timeslot);
103 107
 
@@ -124,8 +128,9 @@  discard block
 block discarded – undo
124 128
         $this->authorize($group);
125 129
         $meeting = Meeting::findOrFail($meetingId);
126 130
         $this->authorize($meeting);
127
-        if ($meeting->start_time != NULL)
128
-            return Response::json(['error' => 'the meeting is already planned'], 422);
131
+        if ($meeting->start_time != NULL) {
132
+                    return Response::json(['error' => 'the meeting is already planned'], 422);
133
+        }
129 134
         $timeslot = MeetingTimeslot::findOrFail($timeslotId);
130 135
         $this->authorize($timeslot);
131 136
 
Please login to merge, or discard this patch.