Skip to content

Commit fba5b68

Browse files
committed
fix errors
1 parent 4105ab0 commit fba5b68

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

phpstan-baseline.neon

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ parameters:
3535
count: 1
3636
path: src/Internal/Repository/WalletRepository.php
3737

38+
-
39+
message: "#^Method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\StateService\\:\\:get\\(\\) should return string\\|null but returns mixed\\.$#"
40+
count: 1
41+
path: src/Internal/Service/StateService.php
42+
43+
-
44+
message: "#^Trying to invoke mixed but it's not a callable\\.$#"
45+
count: 1
46+
path: src/Internal/Service/StateService.php
47+
3848
-
3949
message: "#^Parameter \\#1 \\$number of method Bavix\\\\Wallet\\\\Internal\\\\Service\\\\MathServiceInterface\\:\\:round\\(\\) expects float\\|int\\|string, mixed given\\.$#"
4050
count: 1
@@ -74,3 +84,13 @@ parameters:
7484
message: "#^Parameter \\#2 \\$holderId of method Bavix\\\\Wallet\\\\Internal\\\\Repository\\\\WalletRepositoryInterface\\:\\:getBySlug\\(\\) expects int\\|string, mixed given\\.$#"
7585
count: 1
7686
path: src/Services/WalletService.php
87+
88+
-
89+
message: "#^Cannot call method needs\\(\\) on mixed\\.$#"
90+
count: 3
91+
path: src/WalletServiceProvider.php
92+
93+
-
94+
message: "#^Parameter \\#1 \\$abstract of method Illuminate\\\\Contracts\\\\Container\\\\Container\\:\\:make\\(\\) expects class\\-string\\<wallet\\.internal\\.storage\\>, string given\\.$#"
95+
count: 2
96+
path: src/WalletServiceProvider.php

src/Internal/Service/LockService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function block(string $key, callable $callback): mixed
4545
$this->lockedKeys->put(self::INNER_KEYS . $key, true, $this->seconds);
4646

4747
try {
48-
return $callback();
48+
return $lock->block($this->seconds, $callback);
4949
} finally {
5050
$this->lockedKeys->delete(self::INNER_KEYS . $key);
5151
}

src/Services/RegulatorService.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ public function approve(): void
9393
continue;
9494
}
9595

96-
$before = $this->bookkeeperService->amount($wallet);
9796
$balance = $this->bookkeeperService->increase($wallet, $diffValue);
9897
$wallet->newQuery()
9998
->whereKey($wallet->getKey())

0 commit comments

Comments
 (0)