Skip to content

Commit a5a48f6

Browse files
committed
sort union types
1 parent e0f88e9 commit a5a48f6

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

src/External/Dto/Extra.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ final class Extra implements ExtraDtoInterface
1212
private OptionDtoInterface $deposit;
1313
private OptionDtoInterface $withdraw;
1414

15-
public function __construct(array|OptionDtoInterface|null $deposit, array|OptionDtoInterface|null $withdraw)
15+
public function __construct(OptionDtoInterface|array|null $deposit, OptionDtoInterface|array|null $withdraw)
1616
{
1717
$this->deposit = $deposit instanceof OptionDtoInterface ? $deposit : new Option($deposit);
1818
$this->withdraw = $withdraw instanceof OptionDtoInterface ? $withdraw : new Option($withdraw);

src/Interfaces/Exchangeable.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ interface Exchangeable
2727
* @throws TransactionFailedException
2828
* @throws ExceptionInterface
2929
*/
30-
public function exchange(Wallet $to, $amount, array|ExtraDtoInterface|null $meta = null): Transfer;
30+
public function exchange(Wallet $to, $amount, ExtraDtoInterface|array|null $meta = null): Transfer;
3131

3232
/**
3333
* @param int|string $amount
3434
*/
35-
public function safeExchange(Wallet $to, $amount, array|ExtraDtoInterface|null $meta = null): ?Transfer;
35+
public function safeExchange(Wallet $to, $amount, ExtraDtoInterface|array|null $meta = null): ?Transfer;
3636

3737
/**
3838
* @param int|string $amount
@@ -43,5 +43,5 @@ public function safeExchange(Wallet $to, $amount, array|ExtraDtoInterface|null $
4343
* @throws TransactionFailedException
4444
* @throws ExceptionInterface
4545
*/
46-
public function forceExchange(Wallet $to, $amount, array|ExtraDtoInterface|null $meta = null): Transfer;
46+
public function forceExchange(Wallet $to, $amount, ExtraDtoInterface|array|null $meta = null): Transfer;
4747
}

src/Interfaces/WalletFloat.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ public function forceWithdrawFloat($amount, ?array $meta = null, bool $confirmed
6363
* @throws TransactionFailedException
6464
* @throws ExceptionInterface
6565
*/
66-
public function transferFloat(Wallet $wallet, $amount, array|ExtraDtoInterface|null $meta = null): Transfer;
66+
public function transferFloat(Wallet $wallet, $amount, ExtraDtoInterface|array|null $meta = null): Transfer;
6767

6868
/**
6969
* @param float|string $amount
7070
*/
71-
public function safeTransferFloat(Wallet $wallet, $amount, array|ExtraDtoInterface|null $meta = null): ?Transfer;
71+
public function safeTransferFloat(Wallet $wallet, $amount, ExtraDtoInterface|array|null $meta = null): ?Transfer;
7272

7373
/**
7474
* @param float|string $amount
@@ -79,7 +79,7 @@ public function safeTransferFloat(Wallet $wallet, $amount, array|ExtraDtoInterfa
7979
* @throws TransactionFailedException
8080
* @throws ExceptionInterface
8181
*/
82-
public function forceTransferFloat(Wallet $wallet, $amount, array|ExtraDtoInterface|null $meta = null): Transfer;
82+
public function forceTransferFloat(Wallet $wallet, $amount, ExtraDtoInterface|array|null $meta = null): Transfer;
8383

8484
/**
8585
* @param float|string $amount

src/Internal/Assembler/ExtraDtoAssemblerInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88

99
interface ExtraDtoAssemblerInterface
1010
{
11-
public function create(array|ExtraDtoInterface|null $data): ExtraDtoInterface;
11+
public function create(ExtraDtoInterface|array|null $data): ExtraDtoInterface;
1212
}

src/Services/PrepareService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function transferLazy(
8383
Wallet $to,
8484
string $status,
8585
$amount,
86-
array|ExtraDtoInterface|null $meta = null
86+
ExtraDtoInterface|array|null $meta = null
8787
): TransferLazyDtoInterface {
8888
$discount = $this->personalDiscountService->getDiscount($from, $to);
8989
$toWallet = $this->castService->getWallet($to);

src/Traits/CanExchange.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ trait CanExchange
4141
* @throws TransactionFailedException
4242
* @throws ExceptionInterface
4343
*/
44-
public function exchange(Wallet $to, $amount, array|ExtraDtoInterface|null $meta = null): Transfer
44+
public function exchange(Wallet $to, $amount, ExtraDtoInterface|array|null $meta = null): Transfer
4545
{
4646
$wallet = app(CastServiceInterface::class)->getWallet($this);
4747

@@ -53,7 +53,7 @@ public function exchange(Wallet $to, $amount, array|ExtraDtoInterface|null $meta
5353
/**
5454
* @param int|string $amount
5555
*/
56-
public function safeExchange(Wallet $to, $amount, array|ExtraDtoInterface|null $meta = null): ?Transfer
56+
public function safeExchange(Wallet $to, $amount, ExtraDtoInterface|array|null $meta = null): ?Transfer
5757
{
5858
try {
5959
return $this->exchange($to, $amount, $meta);
@@ -71,7 +71,7 @@ public function safeExchange(Wallet $to, $amount, array|ExtraDtoInterface|null $
7171
* @throws TransactionFailedException
7272
* @throws ExceptionInterface
7373
*/
74-
public function forceExchange(Wallet $to, $amount, array|ExtraDtoInterface|null $meta = null): Transfer
74+
public function forceExchange(Wallet $to, $amount, ExtraDtoInterface|array|null $meta = null): Transfer
7575
{
7676
return app(AtomicServiceInterface::class)->block($this, function () use ($to, $amount, $meta) {
7777
$extraAssembler = app(ExtraDtoAssemblerInterface::class);

src/Traits/HasWalletFloat.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public function canWithdrawFloat($amount): bool
112112
* @throws TransactionFailedException
113113
* @throws ExceptionInterface
114114
*/
115-
public function transferFloat(Wallet $wallet, $amount, array|ExtraDtoInterface|null $meta = null): Transfer
115+
public function transferFloat(Wallet $wallet, $amount, ExtraDtoInterface|array|null $meta = null): Transfer
116116
{
117117
$math = app(MathServiceInterface::class);
118118
$decimalPlacesValue = app(CastServiceInterface::class)->getWallet($this)->decimal_places;
@@ -125,7 +125,7 @@ public function transferFloat(Wallet $wallet, $amount, array|ExtraDtoInterface|n
125125
/**
126126
* @param float|string $amount
127127
*/
128-
public function safeTransferFloat(Wallet $wallet, $amount, array|ExtraDtoInterface|null $meta = null): ?Transfer
128+
public function safeTransferFloat(Wallet $wallet, $amount, ExtraDtoInterface|array|null $meta = null): ?Transfer
129129
{
130130
$math = app(MathServiceInterface::class);
131131
$decimalPlacesValue = app(CastServiceInterface::class)->getWallet($this)->decimal_places;
@@ -144,7 +144,7 @@ public function safeTransferFloat(Wallet $wallet, $amount, array|ExtraDtoInterfa
144144
* @throws TransactionFailedException
145145
* @throws ExceptionInterface
146146
*/
147-
public function forceTransferFloat(Wallet $wallet, $amount, array|ExtraDtoInterface|null $meta = null): Transfer
147+
public function forceTransferFloat(Wallet $wallet, $amount, ExtraDtoInterface|array|null $meta = null): Transfer
148148
{
149149
$math = app(MathServiceInterface::class);
150150
$decimalPlacesValue = app(CastServiceInterface::class)->getWallet($this)->decimal_places;

0 commit comments

Comments
 (0)