Skip to content

Commit bba5a2d

Browse files
authored
Merge pull request #1598 from Blair2004/v4.8.x
V4.8.x
2 parents d65c1df + a431cc5 commit bba5a2d

File tree

271 files changed

+988
-4226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+988
-4226
lines changed

app/Console/Commands/ComputeDailyReportCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function computeMonthReport()
7979
/**
8080
* let's show how it progresses
8181
*/
82-
$this->withProgressBar( $dates, function( $date ) use ( $reportService ) {
82+
$this->withProgressBar( $dates, function ( $date ) use ( $reportService ) {
8383
$reportService->computeDashboardMonth( $date );
8484
});
8585

@@ -119,7 +119,7 @@ public function computeDayReport()
119119
/**
120120
* let's show how it progresses
121121
*/
122-
$this->withProgressBar( $dates, function( $date ) use ( $reportService ) {
122+
$this->withProgressBar( $dates, function ( $date ) use ( $reportService ) {
123123
$reportService->computeDayReport(
124124
$date->startOfDay()->toDateTimeString(),
125125
$date->endOfDay()->toDateTimeString()

app/Console/Commands/DoctorCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function handle()
9696
*/
9797
$productService = app()->make( ProductService::class );
9898

99-
$this->withProgressBar( $products, function( OrderProduct $orderProduct ) use ( $productService ) {
99+
$this->withProgressBar( $products, function ( OrderProduct $orderProduct ) use ( $productService ) {
100100
$orderProduct->total_purchase_price = $productService->getLastPurchasePrice( $orderProduct->product ) * $orderProduct->quantity;
101101
$orderProduct->save();
102102
});

app/Console/Commands/ExtractTranslation.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,14 @@ private function flushTranslation( $newTranslation, $filePath )
183183
* delete all keys that doesn't exists
184184
*/
185185
$purgedTranslation = collect( $existingTranslation )
186-
->filter( function( $translation, $key ) use ( $newTranslation ) {
186+
->filter( function ( $translation, $key ) use ( $newTranslation ) {
187187
return in_array( $key, array_keys( $newTranslation ) );
188188
});
189189

190190
/**
191191
* pull new keys
192192
*/
193-
$newKeys = collect( $newTranslation )->filter( function( $translation, $key ) use ( $existingTranslation ) {
193+
$newKeys = collect( $newTranslation )->filter( function ( $translation, $key ) use ( $existingTranslation ) {
194194
return ! in_array( $key, array_keys( $existingTranslation ) );
195195
});
196196

@@ -204,7 +204,7 @@ private function extractLocalization( $files )
204204
{
205205
$supportedExtensions = [ 'vue', 'php', 'ts', 'js' ];
206206

207-
$filtered = collect( $files )->filter( function( $file ) use ( $supportedExtensions ) {
207+
$filtered = collect( $files )->filter( function ( $file ) use ( $supportedExtensions ) {
208208
$info = pathinfo( $file );
209209

210210
return in_array( $info[ 'extension' ], $supportedExtensions );
@@ -216,7 +216,7 @@ private function extractLocalization( $files )
216216
* we'll extract all the string that can be translated
217217
* and save them within an array.
218218
*/
219-
$this->withProgressBar( $filtered, function( $file ) use ( &$exportable ) {
219+
$this->withProgressBar( $filtered, function ( $file ) use ( &$exportable ) {
220220
$fileContent = Storage::disk( 'ns' )->get( $file );
221221
preg_match_all('/\_\_[m]?\(\s*[\'\"\`]([\w\s\+\"\\/\d\-é&\[\]\@*$#\.\?\%,;)\{\}]*)[\'\"\`]\s*(\,?\s*[\'\"\`]?(\w)*[\'\"\`]?\s*)?\)/', $fileContent, $output_array);
222222

@@ -227,7 +227,7 @@ private function extractLocalization( $files )
227227
}
228228
});
229229

230-
return collect( $exportable )->mapWithKeys( function( $exportable ) {
230+
return collect( $exportable )->mapWithKeys( function ( $exportable ) {
231231
return [ $exportable[ 'string' ] => $exportable[ 'string' ] ];
232232
})->toArray();
233233
}

app/Console/Commands/ModuleSymlinkCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function handle()
4343
Storage::disk( 'ns' )->deleteDirectory( 'public/modules' );
4444
Storage::disk( 'ns' )->makeDirectory( 'public/modules' );
4545

46-
$this->withProgressBar( $modules, function( $module ) use ( $moduleService ) {
46+
$this->withProgressBar( $modules, function ( $module ) use ( $moduleService ) {
4747
$moduleService->createSymLink( $module[ 'namespace' ] );
4848
});
4949

app/Console/Commands/ModulesMigrateCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function handle()
7070
) );
7171
}
7272

73-
$this->withProgressBar( $unmigratedFiles, function( $file ) use ( $module ) {
73+
$this->withProgressBar( $unmigratedFiles, function ( $file ) use ( $module ) {
7474
$response = $this->modulesService->runMigration( $module[ 'namespace' ], $file );
7575
AfterMigrationExecutedEvent::dispatch( $module, $response, $file );
7676
});

app/Console/Commands/ProductCommand.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private function computeTaxes()
6868
*/
6969
$taxService = app()->make( TaxService::class );
7070

71-
$this->withProgressBar( ProductUnitQuantity::with( 'product.tax_group' )->get(), function( ProductUnitQuantity $productUnitQuantity ) use ( $taxService ) {
71+
$this->withProgressBar( ProductUnitQuantity::with( 'product.tax_group' )->get(), function ( ProductUnitQuantity $productUnitQuantity ) use ( $taxService ) {
7272
$taxService->computeTax(
7373
product: $productUnitQuantity,
7474
tax_group_id: $productUnitQuantity->product->tax_group_id,
@@ -85,7 +85,7 @@ private function refreshBarcodes()
8585
{
8686
$queryBuilder = $this->queryBuilder();
8787

88-
$products = $this->withProgressBar( $queryBuilder->get(), function( $product ) {
88+
$products = $this->withProgressBar( $queryBuilder->get(), function ( $product ) {
8989
$this->productService->generateProductBarcode( $product );
9090
});
9191

@@ -105,7 +105,7 @@ private function updateProducts()
105105
{
106106
$queryBuilder = $this->queryBuilder();
107107

108-
$this->perform( $queryBuilder, function( $product ) {
108+
$this->perform( $queryBuilder, function ( $product ) {
109109
$gallery = ProductGallery::where( 'product_id', $product->id )->get();
110110
$units = ProductUnitQuantity::where( 'product_id', $product->id )->get();
111111
$subItems = ProductSubItem::where( 'product_id', $product->id )->get();

app/Console/Kernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ protected function schedule(Schedule $schedule)
3737
* This could be made through events that are dispatched within
3838
* the jobs
3939
*/
40-
$schedule->call( function() {
40+
$schedule->call( function () {
4141
if ( env( 'TELESCOPE_ENABLED', false ) ) {
4242
Artisan::call( 'telescope:prune', [ 'hours' => 12 ]);
4343
}
@@ -91,7 +91,7 @@ protected function schedule(Schedule $schedule)
9191
* We want to make sure Modules Kernel get injected
9292
* on the process so that modules jobs can also be scheduled.
9393
*/
94-
collect( $modules->getEnabled() )->each( function( $module ) use ( $schedule ) {
94+
collect( $modules->getEnabled() )->each( function ( $module ) use ( $schedule ) {
9595
$filePath = $module[ 'path' ] . 'Console' . DIRECTORY_SEPARATOR . 'Kernel.php';
9696

9797
if ( is_file( $filePath ) ) {

app/Crud/CashFlowHistoryCrud.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ public function bulkAction( Request $request )
439439
*/
440440
public function getLinks(): array
441441
{
442-
return [
442+
return [
443443
'list' => ns()->url( 'dashboard/' . 'cash-flow/history' ),
444444
'create' => ns()->url( 'dashboard/' . 'cash-flow/history/create' ),
445445
'edit' => ns()->url( 'dashboard/' . 'cash-flow/history/edit/' ),

app/Crud/CouponCrud.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function getForm( $entry = null )
273273
*/
274274
public function filterPostInputs( $inputs )
275275
{
276-
$inputs = collect( $inputs )->map( function( $field, $key ) {
276+
$inputs = collect( $inputs )->map( function ( $field, $key ) {
277277
if ( ( in_array( $key, [
278278
'minimum_cart_value',
279279
'maximum_cart_value',
@@ -286,7 +286,7 @@ public function filterPostInputs( $inputs )
286286
return $field;
287287
})->toArray();
288288

289-
$inputs = collect( $inputs )->filter( function( $field, $key ) {
289+
$inputs = collect( $inputs )->filter( function ( $field, $key ) {
290290
if ( ( in_array( $key, [
291291
'minimum_cart_value',
292292
'maximum_cart_value',
@@ -318,7 +318,7 @@ public function filterPostInputs( $inputs )
318318
*/
319319
public function filterPutInputs( $inputs, Coupon $entry )
320320
{
321-
$inputs = collect( $inputs )->map( function( $field, $key ) {
321+
$inputs = collect( $inputs )->map( function ( $field, $key ) {
322322
if ( ( in_array( $key, [
323323
'minimum_cart_value',
324324
'maximum_cart_value',
@@ -331,7 +331,7 @@ public function filterPutInputs( $inputs, Coupon $entry )
331331
return $field;
332332
})->toArray();
333333

334-
$inputs = collect( $inputs )->filter( function( $field, $key ) {
334+
$inputs = collect( $inputs )->filter( function ( $field, $key ) {
335335
if ( ( in_array( $key, [
336336
'minimum_cart_value',
337337
'maximum_cart_value',
@@ -481,13 +481,13 @@ public function beforePut( $inputs, $entry )
481481
*/
482482
public function afterPut( $inputs, $coupon )
483483
{
484-
$coupon->categories->each( function( $category ) use ( $inputs ) {
484+
$coupon->categories->each( function ( $category ) use ( $inputs ) {
485485
if ( ! in_array( $category->category_id, $inputs[ 'categories' ] ) ) {
486486
$category->delete();
487487
}
488488
});
489489

490-
$coupon->products->each( function( $product ) use ( $inputs ) {
490+
$coupon->products->each( function ( $product ) use ( $inputs ) {
491491
if ( ! in_array( $product->product_id, $inputs[ 'products' ] ) ) {
492492
$product->delete();
493493
}
@@ -698,7 +698,7 @@ public function bulkAction( Request $request )
698698
*/
699699
public function getLinks(): array
700700
{
701-
return [
701+
return [
702702
'list' => ns()->url( 'dashboard/' . 'customers/coupons' ),
703703
'create' => ns()->url( 'dashboard/' . 'customers/coupons/create' ),
704704
'edit' => ns()->url( 'dashboard/' . 'customers/coupons/edit/' ),

app/Crud/CustomerAccountCrud.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function addFooterSummary( CrudBeforeExportEvent $event )
224224
__( 'Total' )
225225
);
226226

227-
$totalPositive = collect( $event->entries[ 'data' ] )->map( function( $entry ) {
227+
$totalPositive = collect( $event->entries[ 'data' ] )->map( function ( $entry ) {
228228
if ( in_array( $entry->getOriginalValue( 'operation' ), [
229229
CustomerAccountHistory::OPERATION_ADD,
230230
CustomerAccountHistory::OPERATION_REFUND,
@@ -233,7 +233,7 @@ public function addFooterSummary( CrudBeforeExportEvent $event )
233233
}
234234
})->sum();
235235

236-
$totalNegative = collect( $event->entries[ 'data' ] )->map( function( $entry ) {
236+
$totalNegative = collect( $event->entries[ 'data' ] )->map( function ( $entry ) {
237237
if ( in_array( $entry->getOriginalValue( 'operation' ), [
238238
CustomerAccountHistory::OPERATION_DEDUCT,
239239
CustomerAccountHistory::OPERATION_PAYMENT,
@@ -575,7 +575,7 @@ public function bulkAction( Request $request )
575575
*/
576576
public function getLinks(): array
577577
{
578-
return [
578+
return [
579579
'list' => ns()->url( 'dashboard/' . 'customers/' . '/account-history' ),
580580
'create' => ns()->url( 'dashboard/' . 'customers/' . '/account-history/create' ),
581581
'edit' => ns()->url( 'dashboard/' . 'customers/' . '/account-history/edit/' ),

0 commit comments

Comments
 (0)