Completed
Push — master ( 94a3ce...1513a9 )
by Ariel
06:13
created
src/Traits/Preferenceable.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         if (isset($value)) {
31 31
             $this->preferences()->updateOrCreate(['key' => $key], ['value' => $this->cast($value, $type),
32
-                                                                   'type'  => $type, ]);
32
+                                                                    'type'  => $type, ]);
33 33
 
34 34
             return $value;
35 35
         }
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      * Cast value.
43 43
      *
44 44
      * @param  mixed $value
45
-     * @param  mixed $type
45
+     * @param  string $type
46 46
      *
47 47
      * @return mixed Value.
48 48
      */
Please login to merge, or discard this patch.
src/Booking/Timetable.php 1 patch
Doc Comments   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -121,7 +121,6 @@  discard block
 block discarded – undo
121 121
     /**
122 122
      * Setter for interval.
123 123
      *
124
-     * @param  int $minutes
125 124
      *
126 125
      * @return $this
127 126
      */
@@ -280,8 +279,8 @@  discard block
 block discarded – undo
280 279
      * Helper method for Arr::set
281 280
      *
282 281
      * @param  array &$array
283
-     * @param  mixed $key
284
-     * @param  mixed $value
282
+     * @param  string $key
283
+     * @param  integer $value
285 284
      *
286 285
      * @return mixed
287 286
      */
@@ -294,7 +293,7 @@  discard block
 block discarded – undo
294 293
      * Helper method for Arr::get
295 294
      *
296 295
      * @param  array &$array
297
-     * @param  mixed $key
296
+     * @param  string $key
298 297
      * @param  mixed $default
299 298
      *
300 299
      * @return mixed
@@ -304,6 +303,9 @@  discard block
 block discarded – undo
304 303
         return Arr::get($array, $key, $default);
305 304
     }
306 305
 
306
+    /**
307
+     * @param string $array1
308
+     */
307 309
     private function array_substitute(&$array1, $array2)
308 310
     {
309 311
         foreach ($array1 as $key => $value) {
Please login to merge, or discard this patch.
src/Booking/Strategies/BookingTimeslotStrategy.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -95,11 +95,11 @@
 block discarded – undo
95 95
     public function buildTimetable($vacancies, $starting = 'today', $days = 1)
96 96
     {
97 97
         $this->timetable
98
-             ->interval($this->interval)
99
-             ->format('date.service.time')
100
-             ->from($starting)
101
-             ->future($days)
102
-             ->init();
98
+                ->interval($this->interval)
99
+                ->format('date.service.time')
100
+                ->from($starting)
101
+                ->future($days)
102
+                ->init();
103 103
 
104 104
         foreach ($vacancies as $vacancy) {
105 105
             $this->updateTimeslots($vacancy, $this->interval);
Please login to merge, or discard this patch.
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -2,13 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Timegridio\Concierge\Booking\Strategies;
4 4
 
5
-use Carbon\Carbon;
6 5
 use Illuminate\Support\Collection;
7 6
 use Timegridio\Concierge\Booking\Timetable;
8
-use Timegridio\Concierge\Models\Appointment;
9
-use Timegridio\Concierge\Models\Business;
10
-use Timegridio\Concierge\Models\Contact;
11
-use Timegridio\Concierge\Models\Service;
12 7
 use Timegridio\Concierge\Models\Vacancy;
13 8
 
14 9
 class BookingTimeslotStrategy implements BookingStrategyInterface
Please login to merge, or discard this patch.
src/Concierge.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,6 @@
 block discarded – undo
5 5
 use Carbon\Carbon;
6 6
 use Timegridio\Concierge\Booking\Strategies\BookingStrategy;
7 7
 use Timegridio\Concierge\Calendar\VacancyCalendar;
8
-use Timegridio\Concierge\Models\Business;
9 8
 use Timegridio\Concierge\Models\Service;
10 9
 
11 10
 /*******************************************************************************
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -44,10 +44,10 @@
 block discarded – undo
44 44
         $comments = $request['comments'];
45 45
 
46 46
         $vacancies = $this->calendar()
47
-                          ->forService($service->id)
48
-                          ->forDate($request['date'])
49
-                          ->atTime($request['time'])
50
-                          ->find();
47
+                            ->forService($service->id)
48
+                            ->forDate($request['date'])
49
+                            ->atTime($request['time'])
50
+                            ->find();
51 51
 
52 52
         if ($vacancies->count() == 0) {
53 53
             // Log failure feedback message
Please login to merge, or discard this patch.
src/Calendar/DateslotCalendar.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
10 10
 
11 11
         $results = $this->vacancies->get();
12 12
 
13
-        $results = $results->reject(function ($vacancy) {
13
+        $results = $results->reject(function($vacancy) {
14 14
 
15 15
             return !$vacancy->hasRoom();
16 16
         });
Please login to merge, or discard this patch.
src/Calendar/TimeslotCalendar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         if ($this->duration !== null) {
16 16
             $toDatetime = $fromDatetime->addMinutes($this->duration);
17 17
 
18
-            $results = $results->reject(function ($vacancy) use ($fromDatetime, $toDatetime) {
18
+            $results = $results->reject(function($vacancy) use ($fromDatetime, $toDatetime) {
19 19
                 return !$vacancy->hasRoomBetween($fromDatetime, $toDatetime);
20 20
             });
21 21
         }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
             $this->vacancies->forService($this->service);
30 30
         }
31 31
 
32
-        if ($this->date !== null &&  $this->time !== null) {
32
+        if ($this->date !== null && $this->time !== null) {
33 33
             $this->vacancies->forDateTime($this->getUTCDateTime());
34 34
         }
35 35
 
Please login to merge, or discard this patch.
src/Booking/Strategies/BookingStrategy.php 1 patch
Unused Use Statements   -4 removed lines patch added patch discarded remove patch
@@ -2,12 +2,8 @@
 block discarded – undo
2 2
 
3 3
 namespace Timegridio\Concierge\Booking\Strategies;
4 4
 
5
-use Carbon\Carbon;
6 5
 use Timegridio\Concierge\Booking\Timetable;
7 6
 use Timegridio\Concierge\Exceptions\StrategyNotRecognizedException;
8
-use Timegridio\Concierge\Models\Business;
9
-use Timegridio\Concierge\Models\Contact;
10
-use Timegridio\Concierge\Models\Service;
11 7
 
12 8
 class BookingStrategy
13 9
 {
Please login to merge, or discard this patch.
src/Workspace.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -2,8 +2,6 @@
 block discarded – undo
2 2
 
3 3
 namespace Timegridio\Concierge;
4 4
 
5
-use Timegridio\Concierge\Models\Business;
6
-
7 5
 class Workspace
8 6
 {
9 7
     protected $business;
Please login to merge, or discard this patch.