| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 19 | 86 | public function getBalance($object): int |
|
| 20 | { |
||
| 21 | 86 | $wallet = app(WalletService::class)->getWallet($object); |
|
| 22 | 86 | if (!\array_key_exists($wallet->getKey(), $this->balanceSheets)) { |
|
| 23 | 86 | $this->balanceSheets[$wallet->getKey()] = (int) $wallet->getOriginal('balance', 0); |
|
| 24 | } |
||
| 25 | |||
| 26 | 86 | return $this->balanceSheets[$wallet->getKey()]; |
|
| 27 | } |
||
| 50 |