Skip to content

Commit e46e640

Browse files
committed
rector fix
1 parent 5c0d7a8 commit e46e640

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/Internal/Assembler/BalanceUpdatedEventAssembler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(
1919
public function create(Wallet $wallet): BalanceUpdatedEventInterface
2020
{
2121
return new BalanceUpdatedEvent(
22-
(int) $wallet->getKey(),
22+
$wallet->getKey(),
2323
$wallet->uuid,
2424
$wallet->getOriginalBalanceAttribute(),
2525
$this->clockService->now()

src/Internal/Assembler/TransactionCreatedEventAssembler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(
1919
public function create(Transaction $transaction): TransactionCreatedEventInterface
2020
{
2121
return new TransactionCreatedEvent(
22-
(int) $transaction->getKey(),
22+
$transaction->getKey(),
2323
$transaction->type,
2424
$transaction->wallet_id,
2525
$this->clockService->now(),

src/Internal/Assembler/WalletCreatedEventAssembler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function create(Wallet $wallet): WalletCreatedEventInterface
2222
$wallet->holder_type,
2323
$wallet->holder_id,
2424
$wallet->uuid,
25-
(int) $wallet->getKey(),
25+
$wallet->getKey(),
2626
$this->clockService->now()
2727
);
2828
}

src/Services/TransactionService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function apply(array $wallets, array $objects): array
7272
assert($wallet !== null);
7373

7474
$object = $this->castService->getWallet($wallet);
75-
assert((int) $object->getKey() === $walletId);
75+
assert($object->getKey() === $walletId);
7676

7777
$this->regulatorService->increase($object, $total);
7878
}

tests/Units/Domain/EventTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,10 +211,10 @@ static function (TransactionCreatedEventInterface $event) use (
211211
self::assertTrue((bool) app(PurchaseServiceInterface::class)->already($buyer, $cart->getBasketDto()));
212212
self::assertSame(0, $buyer->balanceInt);
213213

214-
$resultIds = [(int) $depositTransaction->getKey()];
214+
$resultIds = [$depositTransaction->getKey()];
215215
$valueIds = $transactionIds[$buyer->wallet->getKey()] ?? [];
216216
foreach ($transfers as $transfer) {
217-
$resultIds[] = (int) $transfer->withdraw->getKey();
217+
$resultIds[] = $transfer->withdraw->getKey();
218218
self::assertSame(1, $transactionCounts[$transfer->deposit->wallet_id] ?? 0);
219219
}
220220

tests/Units/Service/WalletTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function testFindBy(): void
3838

3939
self::assertNotNull($walletService->findBySlug($buyer, 'default'));
4040
self::assertNotNull($walletService->findByUuid($uuid));
41-
self::assertNotNull($walletService->findById((int) $buyer->wallet->getKey()));
41+
self::assertNotNull($walletService->findById($buyer->wallet->getKey()));
4242
}
4343

4444
public function testGetBySlug(): void

0 commit comments

Comments
 (0)