Skip to content

Commit e8c70cc

Browse files
committed
autofix
1 parent 2a8899d commit e8c70cc

File tree

80 files changed

+229
-318
lines changed

Some content is hidden

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

80 files changed

+229
-318
lines changed

database/2018_11_06_222923_create_transactions_table.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
use Illuminate\Database\Schema\Blueprint;
88
use Illuminate\Support\Facades\Schema;
99

10-
return new class() extends Migration {
10+
return new class() extends Migration
11+
{
1112
public function up(): void
1213
{
1314
Schema::create($this->table(), static function (Blueprint $table) {
@@ -18,11 +19,9 @@ public function up(): void
1819
$table->decimal('amount', 64, 0);
1920
$table->boolean('confirmed');
2021
$table->json('meta')
21-
->nullable()
22-
;
22+
->nullable();
2323
$table->uuid('uuid')
24-
->unique()
25-
;
24+
->unique();
2625
$table->timestamps();
2726

2827
$table->index(['payable_type', 'payable_id'], 'payable_type_payable_id_ind');

database/2018_11_07_192923_create_transfers_table.php

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
use Illuminate\Database\Schema\Blueprint;
99
use Illuminate\Support\Facades\Schema;
1010

11-
return new class() extends Migration {
11+
return new class() extends Migration
12+
{
1213
public function up(): void
1314
{
1415
Schema::create($this->table(), function (Blueprint $table) {
@@ -17,41 +18,34 @@ public function up(): void
1718
$table->morphs('to');
1819
$table
1920
->enum('status', ['exchange', 'transfer', 'paid', 'refund', 'gift'])
20-
->default('transfer')
21-
;
21+
->default('transfer');
2222

2323
$table
2424
->enum('status_last', ['exchange', 'transfer', 'paid', 'refund', 'gift'])
25-
->nullable()
26-
;
25+
->nullable();
2726

2827
$table->unsignedBigInteger('deposit_id');
2928
$table->unsignedBigInteger('withdraw_id');
3029

3130
$table->decimal('discount', 64, 0)
32-
->default(0)
33-
;
31+
->default(0);
3432

3533
$table->decimal('fee', 64, 0)
36-
->default(0)
37-
;
34+
->default(0);
3835

3936
$table->uuid('uuid')
40-
->unique()
41-
;
37+
->unique();
4238
$table->timestamps();
4339

4440
$table->foreign('deposit_id')
4541
->references('id')
4642
->on($this->transactionTable())
47-
->onDelete('cascade')
48-
;
43+
->onDelete('cascade');
4944

5045
$table->foreign('withdraw_id')
5146
->references('id')
5247
->on($this->transactionTable())
53-
->onDelete('cascade')
54-
;
48+
->onDelete('cascade');
5549
});
5650
}
5751

database/2018_11_15_124230_create_wallets_table.php

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,26 @@
88
use Illuminate\Database\Schema\Blueprint;
99
use Illuminate\Support\Facades\Schema;
1010

11-
return new class() extends Migration {
11+
return new class() extends Migration
12+
{
1213
public function up(): void
1314
{
1415
Schema::create($this->table(), static function (Blueprint $table) {
1516
$table->bigIncrements('id');
1617
$table->morphs('holder');
1718
$table->string('name');
1819
$table->string('slug')
19-
->index()
20-
;
20+
->index();
2121
$table->uuid('uuid')
22-
->unique()
23-
;
22+
->unique();
2423
$table->string('description')
25-
->nullable()
26-
;
24+
->nullable();
2725
$table->json('meta')
28-
->nullable()
29-
;
26+
->nullable();
3027
$table->decimal('balance', 64, 0)
31-
->default(0)
32-
;
28+
->default(0);
3329
$table->unsignedSmallInteger('decimal_places')
34-
->default(2)
35-
;
30+
->default(2);
3631
$table->timestamps();
3732

3833
$table->unique(['holder_type', 'holder_id', 'slug']);
@@ -42,8 +37,7 @@ public function up(): void
4237
$table->foreign('wallet_id')
4338
->references('id')
4439
->on($this->table())
45-
->onDelete('cascade')
46-
;
40+
->onDelete('cascade');
4741
});
4842
}
4943

database/2021_11_02_202021_update_wallets_uuid_table.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
use Illuminate\Support\Collection;
1010
use Illuminate\Support\Facades\Schema;
1111

12-
return new class() extends Migration {
12+
return new class() extends Migration
13+
{
1314
public function up(): void
1415
{
1516
if (Schema::hasColumn($this->table(), 'uuid')) {
@@ -21,8 +22,7 @@ public function up(): void
2122
$table->uuid('uuid')
2223
->after('slug')
2324
->nullable()
24-
->unique()
25-
;
25+
->unique();
2626
});
2727

2828
Wallet::query()->chunk(10000, static function (Collection $wallets) {
@@ -34,8 +34,7 @@ public function up(): void
3434

3535
Schema::table($this->table(), static function (Blueprint $table) {
3636
$table->uuid('uuid')
37-
->change()
38-
;
37+
->change();
3938
});
4039
}
4140

database/2023_12_30_113122_extra_columns_removed.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
use Illuminate\Database\Schema\Blueprint;
88
use Illuminate\Support\Facades\Schema;
99

10-
return new class() extends Migration {
10+
return new class() extends Migration
11+
{
1112
public function up(): void
1213
{
1314
Schema::table($this->table(), function (Blueprint $table) {
@@ -25,11 +26,9 @@ public function down(): void
2526
{
2627
Schema::table($this->table(), static function (Blueprint $table) {
2728
$table->string('from_type')
28-
->after('from_id')
29-
;
29+
->after('from_id');
3030
$table->string('to_type')
31-
->after('to_id')
32-
;
31+
->after('to_id');
3332
});
3433
}
3534

database/2023_12_30_204610_soft_delete.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
use Illuminate\Database\Schema\Blueprint;
1010
use Illuminate\Support\Facades\Schema;
1111

12-
return new class() extends Migration {
12+
return new class() extends Migration
13+
{
1314
public function up(): void
1415
{
1516
Schema::table((new Wallet())->getTable(), static function (Blueprint $table) {

database/2024_01_24_185401_add_extra_column_in_transfer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
use Illuminate\Database\Schema\Blueprint;
88
use Illuminate\Support\Facades\Schema;
99

10-
return new class() extends Migration {
10+
return new class() extends Migration
11+
{
1112
public function up(): void
1213
{
1314
Schema::table($this->table(), static function (Blueprint $table) {
1415
$table->json('extra')
1516
->nullable()
16-
->after('fee')
17-
;
17+
->after('fee');
1818
});
1919
}
2020

src/External/Api/TransactionQueryHandlerInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ interface TransactionQueryHandlerInterface
1818
* and check the correctness of the balance manually.
1919
*
2020
* @param non-empty-array<TransactionQueryInterface> $objects
21-
*
2221
* @return non-empty-array<string, Transaction>
2322
*
2423
* @throws ExceptionInterface

src/External/Api/TransferQueryHandlerInterface.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ interface TransferQueryHandlerInterface
1818
* and check the correctness of the balance manually.
1919
*
2020
* @param non-empty-array<TransferQueryInterface> $objects
21-
*
2221
* @return non-empty-array<string, Transfer>
2322
*
2423
* @throws ExceptionInterface

src/Interfaces/Customer.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,15 @@ public function refundGift(ProductInterface $product, bool $force = false): bool
9494
public function forceRefundGift(ProductInterface $product): bool;
9595

9696
/**
97+
* @return non-empty-array<Transfer>
98+
*
9799
* @throws ProductEnded
98100
* @throws BalanceIsEmpty
99101
* @throws InsufficientFunds
100102
* @throws RecordNotFoundException
101103
* @throws RecordsNotFoundException
102104
* @throws TransactionFailedException
103105
* @throws ExceptionInterface
104-
*
105-
* @return non-empty-array<Transfer>
106106
*/
107107
public function payFreeCart(CartInterface $cart): array;
108108

@@ -112,26 +112,26 @@ public function payFreeCart(CartInterface $cart): array;
112112
public function safePayCart(CartInterface $cart, bool $force = false): array;
113113

114114
/**
115+
* @return non-empty-array<Transfer>
116+
*
115117
* @throws ProductEnded
116118
* @throws BalanceIsEmpty
117119
* @throws InsufficientFunds
118120
* @throws RecordNotFoundException
119121
* @throws RecordsNotFoundException
120122
* @throws TransactionFailedException
121123
* @throws ExceptionInterface
122-
*
123-
* @return non-empty-array<Transfer>
124124
*/
125125
public function payCart(CartInterface $cart, bool $force = false): array;
126126

127127
/**
128+
* @return non-empty-array<Transfer>
129+
*
128130
* @throws ProductEnded
129131
* @throws RecordNotFoundException
130132
* @throws RecordsNotFoundException
131133
* @throws TransactionFailedException
132134
* @throws ExceptionInterface
133-
*
134-
* @return non-empty-array<Transfer>
135135
*/
136136
public function forcePayCart(CartInterface $cart): array;
137137

0 commit comments

Comments
 (0)