@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('appointments', function (Blueprint $table) { |
|
15 | + Schema::create('appointments', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->integer('issuer_id')->unsigned()->nullable(); |
18 | 18 | $table->foreign('issuer_id')->references('id')->on('users')->onDelete('cascade'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('preferences', function (Blueprint $table) { |
|
15 | + Schema::create('preferences', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->string('key'); |
18 | 18 | $table->string('value'); |
@@ -42,16 +42,16 @@ |
||
42 | 42 | } |
43 | 43 | |
44 | 44 | $fromTime = $this->wrappedObject |
45 | - ->vacancy |
|
46 | - ->start_at |
|
47 | - ->timezone($this->wrappedObject->business->timezone) |
|
48 | - ->format(config('root.time.format')); |
|
45 | + ->vacancy |
|
46 | + ->start_at |
|
47 | + ->timezone($this->wrappedObject->business->timezone) |
|
48 | + ->format(config('root.time.format')); |
|
49 | 49 | |
50 | 50 | $toTime = $this->wrappedObject |
51 | - ->vacancy |
|
52 | - ->finish_at |
|
53 | - ->timezone($this->wrappedObject->business->timezone) |
|
54 | - ->format(config('root.time.format')); |
|
51 | + ->vacancy |
|
52 | + ->finish_at |
|
53 | + ->timezone($this->wrappedObject->business->timezone) |
|
54 | + ->format(config('root.time.format')); |
|
55 | 55 | |
56 | 56 | return ucwords(trans('appointments.text.from_to', ['from' => $fromTime, 'to' => $toTime])); |
57 | 57 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | */ |
47 | 47 | public function setupRoutes(Router $router) |
48 | 48 | { |
49 | - $router->group(['namespace' => 'Timegridio\Concierge\Http\Controllers'], function ($router) { |
|
49 | + $router->group(['namespace' => 'Timegridio\Concierge\Http\Controllers'], function($router) { |
|
50 | 50 | require __DIR__.'/Http/routes.php'; |
51 | 51 | }); |
52 | 52 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | private function registerConcierge() |
68 | 68 | { |
69 | - $this->app->bind('concierge', function ($app) { |
|
69 | + $this->app->bind('concierge', function($app) { |
|
70 | 70 | return new Concierge($app); |
71 | 71 | }); |
72 | 72 | } |
@@ -29,7 +29,7 @@ |
||
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 | } |
@@ -42,7 +42,7 @@ |
||
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 | */ |
@@ -5,7 +5,6 @@ |
||
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 | /******************************************************************************* |
@@ -44,10 +44,10 @@ |
||
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 |
@@ -10,7 +10,7 @@ |
||
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 | }); |
@@ -15,7 +15,7 @@ discard block |
||
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 |
||
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 |
@@ -2,8 +2,6 @@ |
||
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; |