| Total Complexity | 8 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 7 | class DiceHand |
||
| 8 | { |
||
| 9 | /** @var Dice[] $hand */ |
||
| 10 | private array $hand = []; |
||
| 11 | |||
| 12 | public function add(Dice $die): void |
||
| 13 | { |
||
| 14 | $this->hand[] = $die; |
||
| 15 | } |
||
| 16 | |||
| 17 | public function roll(): void |
||
| 21 | } |
||
| 22 | } |
||
| 23 | |||
| 24 | public function getNumberDice(): int |
||
| 25 | { |
||
| 26 | return count($this->hand); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** @return int[] Values */ |
||
| 30 | public function getValues(): array |
||
| 31 | { |
||
| 32 | $values = []; |
||
| 33 | foreach ($this->hand as $die) { |
||
| 34 | $values[] = $die->getValue(); |
||
| 35 | } |
||
| 36 | return $values; |
||
| 37 | } |
||
| 38 | |||
| 39 | /** @return string[] Values */ |
||
| 40 | public function getString(): array |
||
| 47 | } |
||
| 48 | } |
||
| 49 |