@@ -19,7 +19,7 @@ |
||
19 | 19 | */ |
20 | 20 | public function up() |
21 | 21 | { |
22 | - Schema::create('orders', function (Blueprint $table) { |
|
22 | + Schema::create('orders', function(Blueprint $table) { |
|
23 | 23 | $table->id(); |
24 | 24 | $table->foreignIdFor(Customer::class)->constrained()->onUpdate('cascade')->onDelete('cascade'); |
25 | 25 | $table->foreignIdFor(User::class)->nullable()->constrained()->onUpdate('cascade')->onDelete('cascade'); |
@@ -18,12 +18,12 @@ |
||
18 | 18 | */ |
19 | 19 | public function up() |
20 | 20 | { |
21 | - Schema::create('order_statuses', function (Blueprint $table) { |
|
21 | + Schema::create('order_statuses', function(Blueprint $table) { |
|
22 | 22 | $table->id(); |
23 | 23 | $table->foreignIdFor(Order::class)->constrained()->onUpdate('cascade')->onDelete('cascade'); |
24 | 24 | $table->morphs('issuerable'); |
25 | 25 | |
26 | - $table->string('status')->comment('Enum of ' . OrderStatus::class); |
|
26 | + $table->string('status')->comment('Enum of '.OrderStatus::class); |
|
27 | 27 | $table->text('note')->nullable(); |
28 | 28 | $table->timestamps(); |
29 | 29 | }); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function up() |
18 | 18 | { |
19 | - Schema::create('branches', function (Blueprint $table) { |
|
19 | + Schema::create('branches', function(Blueprint $table) { |
|
20 | 20 | $table->id(); |
21 | 21 | |
22 | 22 | $table->string('name'); |
@@ -16,7 +16,7 @@ |
||
16 | 16 | */ |
17 | 17 | public function up() |
18 | 18 | { |
19 | - Schema::create('configurations', function (Blueprint $table) { |
|
19 | + Schema::create('configurations', function(Blueprint $table) { |
|
20 | 20 | $table->id(); |
21 | 21 | |
22 | 22 | $table->string('key')->unique(); |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function up() |
20 | 20 | { |
21 | - Schema::create('items', function (Blueprint $table) { |
|
21 | + Schema::create('items', function(Blueprint $table) { |
|
22 | 22 | $table->id(); |
23 | 23 | $table->foreignIdFor(Order::class)->constrained()->onUpdate('cascade')->onDelete('cascade'); |
24 | 24 | $table->foreignIdFor(Denomination::class)->constrained()->onUpdate('cascade')->onDelete('cascade'); |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @param array $additionalParameters |
20 | 20 | * @return $this |
21 | 21 | */ |
22 | - protected function sayRenderable($view, array $viewData = [], array $viewMergeData = [], array $additionalParameters = []) |
|
22 | + protected function sayRenderable($view, array $viewData = [ ], array $viewMergeData = [ ], array $additionalParameters = [ ]) |
|
23 | 23 | { |
24 | 24 | $view = $view instanceof Renderable ? $view : view($view, $viewData, $viewMergeData); |
25 | 25 | |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | * @param array $additionalParameters |
39 | 39 | * @return $this |
40 | 40 | */ |
41 | - protected function askRenderable($view, $next, array $viewData = [], array $viewMergeData = [], array $additionalParameters = []) |
|
41 | + protected function askRenderable($view, $next, array $viewData = [ ], array $viewMergeData = [ ], array $additionalParameters = [ ]) |
|
42 | 42 | { |
43 | 43 | $view = $view instanceof Renderable ? $view : view($view, $viewData, $viewMergeData); |
44 | 44 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | protected function setUserStorage(array $data, string $key = null) |
88 | 88 | { |
89 | - $this->getBot()->userStorage()->save($data,$key); |
|
89 | + $this->getBot()->userStorage()->save($data, $key); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
@@ -97,10 +97,10 @@ discard block |
||
97 | 97 | * @param bool $forceDestroy |
98 | 98 | * @return void |
99 | 99 | */ |
100 | - protected function destroyUserStorage(string $key = null, array $excepts = [], bool $forceDestroy = false) |
|
100 | + protected function destroyUserStorage(string $key = null, array $excepts = [ ], bool $forceDestroy = false) |
|
101 | 101 | { |
102 | 102 | if (!$forceDestroy) { |
103 | - $excepts[] = '_previous_conversation'; |
|
103 | + $excepts[ ] = '_previous_conversation'; |
|
104 | 104 | |
105 | 105 | /** @var \Illuminate\Support\Collection $storage */ |
106 | 106 | $storage = $this->getUserStorage(); |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | protected function displayValidationErrorMessage(string $validationErrorMessage = null) |
138 | 138 | { |
139 | 139 | if ($validationErrorMessage) { |
140 | - $this->say('⛔️ ' . $validationErrorMessage); |
|
140 | + $this->say('⛔️ '.$validationErrorMessage); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | return $this; |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | if (is_a($conversation, BaseConversation::class)) { |
193 | 193 | $conversation = is_object($conversation) ? get_class($conversation) : $conversation; |
194 | 194 | |
195 | - $this->setUserStorage(['_previous_conversation' => $conversation]); |
|
195 | + $this->setUserStorage([ '_previous_conversation' => $conversation ]); |
|
196 | 196 | } |
197 | 197 | |
198 | 198 | return $this; |
@@ -231,7 +231,7 @@ discard block |
||
231 | 231 | * @param \Closure|null $callback |
232 | 232 | * @return \Symfony\Component\HttpFoundation\Response |
233 | 233 | */ |
234 | - protected function reply($message, array $additionalParameters = [], Closure $callback = null) |
|
234 | + protected function reply($message, array $additionalParameters = [ ], Closure $callback = null) |
|
235 | 235 | { |
236 | 236 | $response = $this->getBot()->reply($message, $additionalParameters); |
237 | 237 |
@@ -22,7 +22,7 @@ |
||
22 | 22 | public function rules() |
23 | 23 | { |
24 | 24 | return [ |
25 | - 'name' => ['required', 'string', 'max:255', Rule::unique(Branch::class)->ignoreModel($this->route('branch'))], |
|
25 | + 'name' => [ 'required', 'string', 'max:255', Rule::unique(Branch::class)->ignoreModel($this->route('branch')) ], |
|
26 | 26 | 'address' => 'required|string', |
27 | 27 | 'address_latitude' => 'required|numeric', |
28 | 28 | 'address_longitude' => 'required|numeric', |
@@ -26,18 +26,18 @@ |
||
26 | 26 | $fieldLongitude = 'address_longitude'; |
27 | 27 | |
28 | 28 | $selectQuery = sprintf( |
29 | - '*, ' . |
|
30 | - '6371 * acos(cos(radians(?)) ' . |
|
31 | - '* cos(radians(%s)) ' . |
|
32 | - '* cos(radians(%s) - radians(?)) ' . |
|
33 | - '+ sin(radians(?)) ' . |
|
29 | + '*, '. |
|
30 | + '6371 * acos(cos(radians(?)) '. |
|
31 | + '* cos(radians(%s)) '. |
|
32 | + '* cos(radians(%s) - radians(?)) '. |
|
33 | + '+ sin(radians(?)) '. |
|
34 | 34 | '* sin(radians(%s))) AS distance', |
35 | 35 | $fieldLatitude, $fieldLongitude, $fieldLatitude |
36 | 36 | ); |
37 | 37 | |
38 | 38 | return $query->selectRaw( |
39 | 39 | $selectQuery, |
40 | - [$latitude, $longitude, $latitude] |
|
40 | + [ $latitude, $longitude, $latitude ] |
|
41 | 41 | )->orderBy('distance'); |
42 | 42 | } |
43 | 43 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | public function definition() |
23 | 23 | { |
24 | 24 | return [ |
25 | - 'name' => 'BCA ' . $this->faker->company, |
|
25 | + 'name' => 'BCA '.$this->faker->company, |
|
26 | 26 | 'address' => $this->faker->address, |
27 | 27 | 'address_latitude' => $latitude = $this->faker->latitude, |
28 | 28 | 'address_longitude' => $longitude = $this->faker->longitude, |