Test Failed
Push — master ( 3ea7c5...de62e4 )
by Vinicius Lourenço
03:18
created
src/Scheduler/Scheduler.php 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -84,29 +84,34 @@
 block discarded – undo
84 84
             $add = true;
85 85
 
86 86
             foreach (Schedule::orderBy('start_at', 'DESC')->cursor() as $schedule) {
87
-            	if($schedule->model_type != $model_type)
88
-            		continue;
87
+            	if($schedule->model_type != $model_type) {
88
+            	            		continue;
89
+            	}
89 90
 
90 91
                 $start = Carbon::parse($schedule->start_at);
91 92
                 $begin = Carbon::parse($start->toDateString());
92 93
 
93
-                if($begin->greaterThan($today))
94
-                    break;
94
+                if($begin->greaterThan($today)) {
95
+                                    break;
96
+                }
95 97
 
96
-                if($begin->notEqualTo($today))
97
-                    continue;
98
+                if($begin->notEqualTo($today)) {
99
+                                    continue;
100
+                }
98 101
 
99 102
                 $end = Carbon::parse($schedule->end_at);
100 103
                 if($start <= Carbon::parse($openingTime->toDateTimeString())
101
-                && $end >= Carbon::parse($openingTime->toDateTimeString())->addMinutes($durationMinutes))
102
-                    $add = false;
104
+                && $end >= Carbon::parse($openingTime->toDateTimeString())->addMinutes($durationMinutes)) {
105
+                                    $add = false;
106
+                }
103 107
             }
104 108
 
105
-            if($add)
106
-                $livres[] = [
109
+            if($add) {
110
+                            $livres[] = [
107 111
                     'start_at' => Carbon::parse($openingTime->toDateTimeString()),
108 112
                     'end_at' => Carbon::parse($openingTime->toDateTimeString())->addMinutes($durationMinutes)
109 113
                 ];
114
+            }
110 115
 
111 116
             $openingTime->addMinutes($durationMinutes);
112 117
         }
Please login to merge, or discard this patch.
src/Scheduler/Models/Schedule.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -52,13 +52,15 @@
 block discarded – undo
52 52
      */
53 53
     public function parseStatusKey($key)
54 54
     {
55
-    	if(is_int($key))
56
-    		return ['status' => $key];
55
+    	if(is_int($key)) {
56
+    	    		return ['status' => $key];
57
+    	}
57 58
 
58 59
     	$status = ScheduleStatus::where('name', $key)->first();
59 60
 
60
-    	if(is_null($status))
61
-    		throw (new ModelNotFound)->setValues(ScheduleStatus::class);
61
+    	if(is_null($status)) {
62
+    	    		throw (new ModelNotFound)->setValues(ScheduleStatus::class);
63
+    	}
62 64
 
63 65
     	return ['status' => $status->id];
64 66
     }
Please login to merge, or discard this patch.