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