@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | /** |
20 | 20 | * Get or set preference value. |
21 | 21 | * |
22 | - * @param mixed $key |
|
22 | + * @param string $key |
|
23 | 23 | * @param mixed $value |
24 | 24 | * @param string $type |
25 | 25 | * |
@@ -42,7 +42,7 @@ discard block |
||
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 | */ |
@@ -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 | } |
@@ -27,7 +27,6 @@ discard block |
||
27 | 27 | /** |
28 | 28 | * Create the Vacancy Service object. |
29 | 29 | * |
30 | - * @param Timegridio\Concierge\Models\Business $business |
|
31 | 30 | */ |
32 | 31 | public function __construct() |
33 | 32 | { |
@@ -37,7 +36,7 @@ discard block |
||
37 | 36 | /** |
38 | 37 | * Set Business. |
39 | 38 | * |
40 | - * @param Timegridio\Concierge\Models\Business $business |
|
39 | + * @param Business $business |
|
41 | 40 | */ |
42 | 41 | public function setBusiness(Business $business) |
43 | 42 | { |
@@ -78,6 +77,9 @@ discard block |
||
78 | 77 | return $this->generateAvailability($vacancies, $starting, $limit); |
79 | 78 | } |
80 | 79 | |
80 | + /** |
|
81 | + * @param integer $userId |
|
82 | + */ |
|
81 | 83 | protected function removeAllBookedVacancies($userId, $vacancies) |
82 | 84 | { |
83 | 85 | $vacancies = $this->strategy->removeBookedVacancies($vacancies); |
@@ -131,7 +133,7 @@ discard block |
||
131 | 133 | * @param Carbon $targetDateTime |
132 | 134 | * @param int $serviceId |
133 | 135 | * |
134 | - * @return Timegridio\Concierge\Models\Vacancy |
|
136 | + * @return Models\Appointment |
|
135 | 137 | */ |
136 | 138 | public function getSlotFor(Carbon $targetDateTime, $serviceId) |
137 | 139 | { |
@@ -268,6 +270,9 @@ discard block |
||
268 | 270 | return $vacancy !== null; |
269 | 271 | } |
270 | 272 | |
273 | + /** |
|
274 | + * @param string $key |
|
275 | + */ |
|
271 | 276 | protected function arrayGroupBy($key, $array) |
272 | 277 | { |
273 | 278 | $grouped = []; |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('categories', function (Blueprint $table) { |
|
15 | + Schema::create('categories', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->string('slug')->unique(); |
18 | 18 | $table->string('name'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('users', function (Blueprint $table) { |
|
15 | + Schema::create('users', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->string('username'); // Long enough as to hold an md5 |
18 | 18 | $table->string('name'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('domains', function (Blueprint $table) { |
|
15 | + Schema::create('domains', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->string('slug', 50)->unique(); |
18 | 18 | $table->integer('owner_id')->unsigned(); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('businesses', function (Blueprint $table) { |
|
15 | + Schema::create('businesses', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->integer('category_id')->unsigned(); |
18 | 18 | $table->foreign('category_id')->references('id')->on('categories'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('business_user', function (Blueprint $table) { |
|
15 | + Schema::create('business_user', function(Blueprint $table) { |
|
16 | 16 | $table->integer('business_id')->unsigned()->index(); |
17 | 17 | $table->foreign('business_id')->references('id')->on('businesses')->onDelete('cascade'); |
18 | 18 | $table->integer('user_id')->unsigned()->index(); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public function up() |
13 | 13 | { |
14 | - Schema::create('service_types', function ($table) { |
|
14 | + Schema::create('service_types', function($table) { |
|
15 | 15 | $table->increments('id'); |
16 | 16 | $table->integer('business_id')->unsigned(); |
17 | 17 | $table->foreign('business_id')->references('id')->on('businesses'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('services', function (Blueprint $table) { |
|
15 | + Schema::create('services', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->integer('business_id')->unsigned(); |
18 | 18 | $table->foreign('business_id')->references('id')->on('businesses')->onDelete('cascade'); |