@@ -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'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('contacts', function (Blueprint $table) { |
|
15 | + Schema::create('contacts', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->integer('user_id')->unsigned()->nullable(); |
18 | 18 | $table->foreign('user_id')->references('id')->on('users'); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('business_contact', function (Blueprint $table) { |
|
15 | + Schema::create('business_contact', 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('contact_id')->unsigned()->index(); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('vacancies', function (Blueprint $table) { |
|
15 | + Schema::create('vacancies', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->date('date'); |
18 | 18 | $table->timestamp('start_at')->nullable()->index(); |
@@ -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'); |
@@ -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 | }); |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | /** |
82 | 82 | * Get the issuer (the User that generated the Appointment). |
83 | 83 | * |
84 | - * @return Illuminate\Database\Eloquent\belongsTo |
|
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 Illuminate\Database\Eloquent\belongsTo |
|
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 Illuminate\Database\Eloquent\belongsTo |
|
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 Illuminate\Database\Eloquent\belongsTo |
|
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 Illuminate\Database\Eloquent\belongsTo |
|
125 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
126 | 126 | */ |
127 | 127 | public function vacancy() |
128 | 128 | { |
@@ -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 |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * Belongs to a Category. |
66 | 66 | * |
67 | - * @return Illuminate\Database\Eloquent\Relations\BelongsTo |
|
67 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsTo |
|
68 | 68 | */ |
69 | 69 | public function category() |
70 | 70 | { |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | /** |
88 | 88 | * Provides a catalog of Services. |
89 | 89 | * |
90 | - * @return Illuminate\Database\Eloquent\Relations\HasMany |
|
90 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany |
|
91 | 91 | */ |
92 | 92 | public function services() |
93 | 93 | { |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | /** |
98 | 98 | * Provides Services of Types. |
99 | 99 | * |
100 | - * @return Illuminate\Database\Eloquent\Relations\HasMany |
|
100 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany |
|
101 | 101 | */ |
102 | 102 | public function servicetypes() |
103 | 103 | { |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | /** |
108 | 108 | * Publishes Vacancies. |
109 | 109 | * |
110 | - * @return Illuminate\Database\Eloquent\hasMany |
|
110 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany |
|
111 | 111 | */ |
112 | 112 | public function vacancies() |
113 | 113 | { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | /** |
118 | 118 | * Holds booked Appointments. |
119 | 119 | * |
120 | - * @return Illuminate\Database\Eloquent\hasMany |
|
120 | + * @return \Illuminate\Database\Eloquent\Relations\HasMany |
|
121 | 121 | */ |
122 | 122 | public function bookings() |
123 | 123 | { |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | /** |
128 | 128 | * Is owned by Users. |
129 | 129 | * |
130 | - * @return Illuminate\Database\Eloquent\belongsToMany |
|
130 | + * @return \Illuminate\Database\Eloquent\Relations\BelongsToMany |
|
131 | 131 | */ |
132 | 132 | public function owners() |
133 | 133 | { |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | /** |
250 | 250 | * Set Postal Address. |
251 | 251 | * |
252 | - * @param string $postal_address Postal address |
|
252 | + * @param string $postalAddress Postal address |
|
253 | 253 | */ |
254 | 254 | public function setPostalAddressAttribute($postalAddress) |
255 | 255 | { |
@@ -259,7 +259,6 @@ discard block |
||
259 | 259 | /** |
260 | 260 | * Set Social Facebook. |
261 | 261 | * |
262 | - * @param string $social_facebook Facebook User URL |
|
263 | 262 | */ |
264 | 263 | public function setSocialFacebookAttribute($facebookPageUrl) |
265 | 264 | { |
@@ -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 | } |