| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 28 | public function solve(): void |
||
| 29 | { |
||
| 30 | $amountWrappingPaper = 0; |
||
| 31 | foreach ($this->dimensions as $dimension) { |
||
| 32 | $present = Present::fromString($dimension); |
||
| 33 | $amountWrappingPaper += $present->getSurfaceArea(); |
||
| 34 | $amountWrappingPaper += $present->getSmallestSideArea(); |
||
| 35 | } |
||
| 36 | |||
| 37 | printf("The total amount of wrapping paper is: %s\n", $amountWrappingPaper); |
||
| 38 | } |
||
| 46 |