@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * |
| 47 | 47 | * @param Collection $vacancies |
| 48 | 48 | * |
| 49 | - * @return Illuminate\Database\Eloquent\Collection |
|
| 49 | + * @return Collection |
|
| 50 | 50 | */ |
| 51 | 51 | public function removeBookedVacancies(Collection $vacancies) |
| 52 | 52 | { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * |
| 63 | 63 | * @param Collection $vacancies |
| 64 | 64 | * |
| 65 | - * @return Illuminate\Database\Eloquent\Collection |
|
| 65 | + * @return Collection |
|
| 66 | 66 | */ |
| 67 | 67 | public function removeSelfBooked(Collection $vacancies, $userId) |
| 68 | 68 | { |
@@ -95,11 +95,11 @@ |
||
| 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); |
@@ -81,7 +81,7 @@ discard block |
||
| 81 | 81 | /** |
| 82 | 82 | * Get the issuer (the User that generated the Appointment). |
| 83 | 83 | * |
| 84 | - * @return Timegridio\Concierge\Models\User |
|
| 84 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 85 | 85 | */ |
| 86 | 86 | public function issuer() |
| 87 | 87 | { |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | /** |
| 92 | 92 | * Get the target Contact (for whom is reserved the Appointment). |
| 93 | 93 | * |
| 94 | - * @return Contact |
|
| 94 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 95 | 95 | */ |
| 96 | 96 | public function contact() |
| 97 | 97 | { |
@@ -101,7 +101,7 @@ discard block |
||
| 101 | 101 | /** |
| 102 | 102 | * Get the holding Business (that has taken the reservation). |
| 103 | 103 | * |
| 104 | - * @return Business |
|
| 104 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 105 | 105 | */ |
| 106 | 106 | public function business() |
| 107 | 107 | { |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | /** |
| 112 | 112 | * Get the reserved Service. |
| 113 | 113 | * |
| 114 | - * @return Service |
|
| 114 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 115 | 115 | */ |
| 116 | 116 | public function service() |
| 117 | 117 | { |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | * Get the Vacancy (that justifies the availability of resources for the |
| 123 | 123 | * Appointment generation). |
| 124 | 124 | * |
| 125 | - * @return Vacancy |
|
| 125 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
| 126 | 126 | */ |
| 127 | 127 | public function vacancy() |
| 128 | 128 | { |
@@ -542,19 +542,19 @@ |
||
| 542 | 542 | |
| 543 | 543 | $query->where(function ($query) use ($startAt, $finishAt) { |
| 544 | 544 | $query->where('finish_at', '>=', $finishAt->timezone('UTC')) |
| 545 | - ->where('start_at', '<=', $startAt->timezone('UTC')); |
|
| 545 | + ->where('start_at', '<=', $startAt->timezone('UTC')); |
|
| 546 | 546 | }) |
| 547 | 547 | ->orWhere(function ($query) use ($startAt, $finishAt) { |
| 548 | 548 | $query->where('finish_at', '<', $finishAt->timezone('UTC')) |
| 549 | - ->where('finish_at', '>', $startAt->timezone('UTC')); |
|
| 549 | + ->where('finish_at', '>', $startAt->timezone('UTC')); |
|
| 550 | 550 | }) |
| 551 | 551 | ->orWhere(function ($query) use ($startAt, $finishAt) { |
| 552 | 552 | $query->where('start_at', '>', $startAt->timezone('UTC')) |
| 553 | - ->where('start_at', '<', $finishAt->timezone('UTC')); |
|
| 553 | + ->where('start_at', '<', $finishAt->timezone('UTC')); |
|
| 554 | 554 | }) |
| 555 | 555 | ->orWhere(function ($query) use ($startAt, $finishAt) { |
| 556 | 556 | $query->where('start_at', '>', $startAt->timezone('UTC')) |
| 557 | - ->where('finish_at', '<', $finishAt->timezone('UTC')); |
|
| 557 | + ->where('finish_at', '<', $finishAt->timezone('UTC')); |
|
| 558 | 558 | }); |
| 559 | 559 | |
| 560 | 560 | }); |
@@ -412,10 +412,10 @@ discard block |
||
| 412 | 412 | public function scopeUnarchived($query) |
| 413 | 413 | { |
| 414 | 414 | return $query |
| 415 | - ->where(function ($query) { |
|
| 415 | + ->where(function($query) { |
|
| 416 | 416 | $query->whereIn('status', [Self::STATUS_RESERVED, Self::STATUS_CONFIRMED]) |
| 417 | 417 | ->where('start_at', '<=', Carbon::parse('today midnight')->timezone('UTC')) |
| 418 | - ->orWhere(function ($query) { |
|
| 418 | + ->orWhere(function($query) { |
|
| 419 | 419 | $query->where('start_at', '>=', Carbon::parse('today midnight')->timezone('UTC')); |
| 420 | 420 | }); |
| 421 | 421 | }); |
@@ -538,21 +538,21 @@ discard block |
||
| 538 | 538 | public function scopeAffectingInterval($query, Carbon $startAt, Carbon $finishAt) |
| 539 | 539 | { |
| 540 | 540 | return $query |
| 541 | - ->where(function ($query) use ($startAt, $finishAt) { |
|
| 541 | + ->where(function($query) use ($startAt, $finishAt) { |
|
| 542 | 542 | |
| 543 | - $query->where(function ($query) use ($startAt, $finishAt) { |
|
| 543 | + $query->where(function($query) use ($startAt, $finishAt) { |
|
| 544 | 544 | $query->where('finish_at', '>=', $finishAt->timezone('UTC')) |
| 545 | 545 | ->where('start_at', '<=', $startAt->timezone('UTC')); |
| 546 | 546 | }) |
| 547 | - ->orWhere(function ($query) use ($startAt, $finishAt) { |
|
| 547 | + ->orWhere(function($query) use ($startAt, $finishAt) { |
|
| 548 | 548 | $query->where('finish_at', '<', $finishAt->timezone('UTC')) |
| 549 | 549 | ->where('finish_at', '>', $startAt->timezone('UTC')); |
| 550 | 550 | }) |
| 551 | - ->orWhere(function ($query) use ($startAt, $finishAt) { |
|
| 551 | + ->orWhere(function($query) use ($startAt, $finishAt) { |
|
| 552 | 552 | $query->where('start_at', '>', $startAt->timezone('UTC')) |
| 553 | 553 | ->where('start_at', '<', $finishAt->timezone('UTC')); |
| 554 | 554 | }) |
| 555 | - ->orWhere(function ($query) use ($startAt, $finishAt) { |
|
| 555 | + ->orWhere(function($query) use ($startAt, $finishAt) { |
|
| 556 | 556 | $query->where('start_at', '>', $startAt->timezone('UTC')) |
| 557 | 557 | ->where('finish_at', '<', $finishAt->timezone('UTC')); |
| 558 | 558 | }); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | /** |
| 69 | 69 | * belongs to Category. |
| 70 | 70 | * |
| 71 | - * @return Illuminate\Database\Query Relationship Business Category query |
|
| 71 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo Relationship Business Category query |
|
| 72 | 72 | */ |
| 73 | 73 | public function category() |
| 74 | 74 | { |
@@ -92,7 +92,7 @@ discard block |
||
| 92 | 92 | /** |
| 93 | 93 | * provides Services. |
| 94 | 94 | * |
| 95 | - * @return Illuminate\Database\Query Relationship Business provided Services query |
|
| 95 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany Relationship Business provided Services query |
|
| 96 | 96 | */ |
| 97 | 97 | public function services() |
| 98 | 98 | { |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | /** |
| 103 | 103 | * provides Service types. |
| 104 | 104 | * |
| 105 | - * @return Illuminate\Database\Query Relationship |
|
| 105 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany Relationship |
|
| 106 | 106 | */ |
| 107 | 107 | public function servicetypes() |
| 108 | 108 | { |
@@ -112,7 +112,7 @@ discard block |
||
| 112 | 112 | /** |
| 113 | 113 | * publishes Vacancies. |
| 114 | 114 | * |
| 115 | - * @return Illuminate\Database\Query Relationship Business published Vacancies query |
|
| 115 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany Relationship Business published Vacancies query |
|
| 116 | 116 | */ |
| 117 | 117 | public function vacancies() |
| 118 | 118 | { |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | * ToDo: Should be renamed to "appointments" |
| 124 | 124 | * holds Appointments booking. |
| 125 | 125 | * |
| 126 | - * @return Illuminate\Database\Query Relationship Business holds Appointments query |
|
| 126 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany Relationship Business holds Appointments query |
|
| 127 | 127 | */ |
| 128 | 128 | public function bookings() |
| 129 | 129 | { |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | /** |
| 134 | 134 | * belongs to Users. |
| 135 | 135 | * |
| 136 | - * @return Illuminate\Database\Query Relationship Business belongs to User (owners) query |
|
| 136 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany Relationship Business belongs to User (owners) query |
|
| 137 | 137 | */ |
| 138 | 138 | public function owners() |
| 139 | 139 | { |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | /** |
| 258 | 258 | * set Postal Address. |
| 259 | 259 | * |
| 260 | - * @param string $postal_address Postal address |
|
| 260 | + * @param string $postalAddress Postal address |
|
| 261 | 261 | */ |
| 262 | 262 | public function setPostalAddressAttribute($postalAddress) |
| 263 | 263 | { |
@@ -267,7 +267,6 @@ discard block |
||
| 267 | 267 | /** |
| 268 | 268 | * set Social Facebook. |
| 269 | 269 | * |
| 270 | - * @param string $social_facebook Facebook User URL |
|
| 271 | 270 | */ |
| 272 | 271 | public function setSocialFacebookAttribute($facebookPageUrl) |
| 273 | 272 | { |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | { |
| 39 | 39 | parent::boot(); |
| 40 | 40 | |
| 41 | - static::creating(function ($business) { |
|
| 41 | + static::creating(function($business) { |
|
| 42 | 42 | |
| 43 | 43 | $business->slug = $business->makeSlug($business->name); |
| 44 | 44 | |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * is profile of User. |
| 33 | 33 | * |
| 34 | - * @return Illuminate\Database\Query Relationship Contact belongs to User query |
|
| 34 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo Relationship Contact belongs to User query |
|
| 35 | 35 | */ |
| 36 | 36 | public function user() |
| 37 | 37 | { |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | /** |
| 42 | 42 | * belongs to Business. |
| 43 | 43 | * |
| 44 | - * @return Illuminate\Database\Query Relationship Contact is part of Businesses addressbooks query |
|
| 44 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany Relationship Contact is part of Businesses addressbooks query |
|
| 45 | 45 | */ |
| 46 | 46 | public function businesses() |
| 47 | 47 | { |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | /** |
| 52 | 52 | * has Appointments. |
| 53 | 53 | * |
| 54 | - * @return Illuminate\Database\Query Relationship Contact has booked Appointments query |
|
| 54 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany Relationship Contact has booked Appointments query |
|
| 55 | 55 | */ |
| 56 | 56 | public function appointments() |
| 57 | 57 | { |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | /** |
| 37 | 37 | * [getDefault description]. |
| 38 | 38 | * |
| 39 | - * @param [type] $model [description] |
|
| 39 | + * @param \Timegridio\Concierge\Traits\Preferenceable $model [description] |
|
| 40 | 40 | * @param [type] $key [description] |
| 41 | 41 | * |
| 42 | 42 | * @return [type] [description] |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | /** |
| 24 | 24 | * Belongs to service type. |
| 25 | 25 | * |
| 26 | - * @return Illuminate\Database\Query Relationship Service belongs to type query |
|
| 26 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo Relationship Service belongs to type query |
|
| 27 | 27 | */ |
| 28 | 28 | public function type() |
| 29 | 29 | { |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | /** |
| 48 | 48 | * belongs to Business. |
| 49 | 49 | * |
| 50 | - * @return Illuminate\Database\Query Relationship Service belongs to Business query |
|
| 50 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo Relationship Service belongs to Business query |
|
| 51 | 51 | */ |
| 52 | 52 | public function business() |
| 53 | 53 | { |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | /** |
| 36 | 36 | * belongs to Business. |
| 37 | 37 | * |
| 38 | - * @return Illuminate\Database\Query Relationship Vacancy belongs to Business query |
|
| 38 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo Relationship Vacancy belongs to Business query |
|
| 39 | 39 | */ |
| 40 | 40 | public function business() |
| 41 | 41 | { |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | /** |
| 46 | 46 | * for Service. |
| 47 | 47 | * |
| 48 | - * @return Illuminate\Database\Query Relationship Vacancy is for providing Service query |
|
| 48 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo Relationship Vacancy is for providing Service query |
|
| 49 | 49 | */ |
| 50 | 50 | public function service() |
| 51 | 51 | { |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | /** |
| 56 | 56 | * holds many Appointments. |
| 57 | 57 | * |
| 58 | - * @return Illuminate\Database\Query Relationship Vacancy belongs to Business query |
|
| 58 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany Relationship Vacancy belongs to Business query |
|
| 59 | 59 | */ |
| 60 | 60 | public function appointments() |
| 61 | 61 | { |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | public function scopeForDateTime($query, Carbon $datetime) |
| 91 | 91 | { |
| 92 | 92 | return $query->where('start_at', '<=', $datetime->toDateTimeString()) |
| 93 | - ->where('finish_at', '>=', $datetime->toDateTimeString()); |
|
| 93 | + ->where('finish_at', '>=', $datetime->toDateTimeString()); |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
@@ -195,9 +195,9 @@ discard block |
||
| 195 | 195 | public function hasRoomBetween(Carbon $startAt, Carbon $finishAt) |
| 196 | 196 | { |
| 197 | 197 | return $this->capacity > $this->appointments() |
| 198 | - ->active() |
|
| 199 | - ->affectingInterval($startAt, $finishAt) |
|
| 200 | - ->count() && |
|
| 198 | + ->active() |
|
| 199 | + ->affectingInterval($startAt, $finishAt) |
|
| 200 | + ->count() && |
|
| 201 | 201 | ($this->start_at <= $startAt && $this->finish_at >= $finishAt); |
| 202 | 202 | } |
| 203 | 203 | |
@@ -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 | } |
@@ -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'); |