Completed
Push — master ( 21057e...5ab18c )
by claudio
12:21 queued 36s
created
app/Http/Controllers/Employees/Meetings/MeetingsController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,8 +11,8 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public function __construct()
13 13
     {
14
-        config(['auth.model' => \plunner\Employee::class]);
15
-        config(['jwt.user' => \plunner\Employee::class]);
14
+        config([ 'auth.model' => \plunner\Employee::class ]);
15
+        config([ 'jwt.user' => \plunner\Employee::class ]);
16 16
         $this->middleware('jwt.authandrefresh:mode-en');
17 17
     }
18 18
 
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
         $employee = \Auth::user();
28 28
         $meetings = $employee->meetings();
29 29
         if ($request->query('current'))
30
-            $meetings->where(function ($query) { //parenthesis for conditions ...(C1 OR C2)...
31
-                $query->where('start_time', '=', NULL);//to be planned
30
+            $meetings->where(function($query) { //parenthesis for conditions ...(C1 OR C2)...
31
+                $query->where('start_time', '=', NULL); //to be planned
32 32
                 //datetime to consider timezone, don't use mysql NOW()
33
-                $query->orWhere('start_time', '>=', new \DateTime());//planned
33
+                $query->orWhere('start_time', '>=', new \DateTime()); //planned
34 34
             });
35 35
         return $meetings->get();
36 36
     }
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
     private static function getImg(Meeting $meeting)
74 74
     {
75
-        $name = 'meetings/' . $meeting->id;
75
+        $name = 'meetings/'.$meeting->id;
76 76
         if (!\Storage::exists($name))
77 77
             return false;
78 78
         return \Storage::get($name);
Please login to merge, or discard this patch.
app/Http/Controllers/Employees/Planners/MeetingsController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
 {
15 15
     public function __construct()
16 16
     {
17
-        config(['auth.model' => \plunner\Planner::class]);
18
-        config(['jwt.user' => \plunner\Planner::class]);
17
+        config([ 'auth.model' => \plunner\Planner::class ]);
18
+        config([ 'jwt.user' => \plunner\Planner::class ]);
19 19
         $this->middleware('jwt.authandrefresh:mode-en');
20 20
     }
21 21
 
@@ -33,10 +33,10 @@  discard block
 block discarded – undo
33 33
         $this->authorize($group);
34 34
         $meetings = $group->meetings();
35 35
         if ($request->query('current'))
36
-            $meetings->where(function ($query) { //parenthesis for conditions ...(C1 OR C2)...
37
-                $query->where('start_time', '=', NULL);//to be planned
36
+            $meetings->where(function($query) { //parenthesis for conditions ...(C1 OR C2)...
37
+                $query->where('start_time', '=', NULL); //to be planned
38 38
                 //datetime to consider timezone, don't use mysql NOW()
39
-                $query->orWhere('start_time', '>=', new \DateTime());//planned
39
+                $query->orWhere('start_time', '>=', new \DateTime()); //planned
40 40
             });
41 41
 
42 42
         return $meetings->get();
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
      */
87 87
     public function storeImage(Requests\Request $request, $groupId, $meetingId)
88 88
     {
89
-        $this->validate($request, ['data' => 'required|image']);
89
+        $this->validate($request, [ 'data' => 'required|image' ]);
90 90
         $group = Group::findOrFail($groupId);
91 91
         $this->authorize($group);
92 92
         $meeting = Group::findOrFail($meetingId);
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 
99 99
     private static function putImg($file, Meeting $meeting)
100 100
     {
101
-        \Storage::put('meetings/' . $meeting->id, \File::get($file));
101
+        \Storage::put('meetings/'.$meeting->id, \File::get($file));
102 102
     }
103 103
 
104 104
     /**
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
     private static function getImg(Meeting $meeting)
127 127
     {
128
-        $name = 'meetings/' . $meeting->id;
128
+        $name = 'meetings/'.$meeting->id;
129 129
         if (!\Storage::exists($name))
130 130
             return false;
131 131
         return \Storage::get($name);
@@ -147,8 +147,8 @@  discard block
 block discarded – undo
147 147
         $this->authorize($meeting);
148 148
         $input = $request->all();
149 149
         //the planner cannot modify the duration of a planed meeting
150
-        if ($meeting->start_time != NULL && $meeting->duration != $input['duration'])
151
-            return Response::json(['error' => 'the meeting is already planned, you cannot change the duration'], 422);
150
+        if ($meeting->start_time != NULL && $meeting->duration != $input[ 'duration' ])
151
+            return Response::json([ 'error' => 'the meeting is already planned, you cannot change the duration' ], 422);
152 152
         $meeting->update($input);
153 153
         return $meeting;
154 154
     }
Please login to merge, or discard this patch.