Total Complexity | 2 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class PayoutBlackJack |
||
9 | { |
||
10 | /** |
||
11 | * Calculate the payout based on outcome and bet amount. |
||
12 | * |
||
13 | * @param string $outcome Game result: 'win', 'blackjack', 'draw', or 'loss'. |
||
14 | * @param int $bet The player's original bet. |
||
15 | * |
||
16 | * @return int The payout amount to be added to the player's balance. |
||
17 | */ |
||
18 | 3 | public function payout(string $outcome, int $bet): int |
|
26 | 3 | }; |
|
27 | } |
||
28 | |||
29 | 3 | public function applyPayout(string $outcome, int $bet, int &$balance): void |
|
34 |