Completed
Push — master ( 6ea7ff...8c9744 )
by Ariel
11:07
created
migrations/2016_03_18_000001_create_humanresources_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::create('humanresources', function (Blueprint $table) {
15
+        Schema::create('humanresources', function(Blueprint $table) {
16 16
             $table->increments('id');
17 17
             $table->string('name');
18 18
             $table->string('slug', 50)->index();
Please login to merge, or discard this patch.
src/Vacancy/VacancyManager.php 3 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -105,9 +105,9 @@
 block discarded – undo
105 105
         if(!is_numeric($statement['capacity']))
106 106
         {
107 107
             $vacancyValues['humanresource_id'] = $business->humanresources()
108
-                                                          ->where('slug', $statement['capacity'])
109
-                                                          ->first()
110
-                                                          ->id;
108
+                                                            ->where('slug', $statement['capacity'])
109
+                                                            ->first()
110
+                                                            ->id;
111 111
         }
112 112
         else
113 113
         {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@
 block discarded – undo
102 102
             ];
103 103
 
104 104
         // If capacity is a slug, grab the humanresource
105
-        if(!is_numeric($statement['capacity']))
105
+        if (!is_numeric($statement['capacity']))
106 106
         {
107 107
             $vacancyValues['humanresource_id'] = $business->humanresources()
108 108
                                                           ->where('slug', $statement['capacity'])
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,8 +108,7 @@
 block discarded – undo
108 108
                                                           ->where('slug', $statement['capacity'])
109 109
                                                           ->first()
110 110
                                                           ->id;
111
-        }
112
-        else
111
+        } else
113 112
         {
114 113
             $vacancyValues['capacity'] = intval($statement['capacity']);
115 114
         }
Please login to merge, or discard this patch.
src/Models/Vacancy.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
     public function hasRoomBetween(Carbon $startAt, Carbon $finishAt)
222 222
     {
223 223
         return $this->capacity > $this->business
224
-                                      ->bookings()
225
-                                      ->active()
226
-                                      ->affectingInterval($startAt, $finishAt)
227
-                                      ->affectingHumanresource($this->humanresource_id)
228
-                                      ->count() &&
224
+                                        ->bookings()
225
+                                        ->active()
226
+                                        ->affectingInterval($startAt, $finishAt)
227
+                                        ->affectingHumanresource($this->humanresource_id)
228
+                                        ->count() &&
229 229
             ($this->start_at <= $startAt && $this->finish_at >= $finishAt);
230 230
     }
231 231
 
@@ -241,12 +241,12 @@  discard block
 block discarded – undo
241 241
         }
242 242
 
243 243
         $count = $this->business
244
-                      ->bookings()
245
-                      ->with('humanresource')
246
-                      ->active()
247
-                      ->affectingHumanresource($this->humanresource_id)
248
-                      ->affectingInterval($startAt, $finishAt)
249
-                      ->count();
244
+                        ->bookings()
245
+                        ->with('humanresource')
246
+                        ->active()
247
+                        ->affectingHumanresource($this->humanresource_id)
248
+                        ->affectingInterval($startAt, $finishAt)
249
+                        ->count();
250 250
 
251 251
         return $this->capacity - intval($count);
252 252
     }
Please login to merge, or discard this patch.