Total Complexity | 4 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class CardHand |
||
11 | { |
||
12 | /** |
||
13 | * @var Card[] |
||
14 | */ |
||
15 | private array $hand = []; |
||
16 | |||
17 | /** |
||
18 | * Add a card to the hand. |
||
19 | */ |
||
20 | 7 | public function add(Card $card): void |
|
21 | { |
||
22 | 7 | $this->hand[] = $card; |
|
23 | } |
||
24 | |||
25 | /** |
||
26 | * Return the values of the cards at hand. |
||
27 | * @return string[][] |
||
28 | */ |
||
29 | 8 | public function getValues(): array |
|
36 | } |
||
37 | |||
38 | /** |
||
39 | * Return the number of cards at hand. |
||
40 | */ |
||
41 | 1 | public function getNumberCards(): int |
|
46 |