| Total Complexity | 6 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Coverage | 33.33% |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | abstract class InventoryItem implements \Stringable |
||
| 8 | { |
||
| 9 | 6 | public function __construct( |
|
| 10 | protected string $name, |
||
| 11 | protected string $description, |
||
| 12 | protected Coin $sellValue, |
||
| 13 | protected Coin $buyValue, |
||
| 14 | 6 | ) {} |
|
| 15 | |||
| 16 | 1 | public function getName(): string |
|
| 17 | { |
||
| 18 | 1 | return $this->name; |
|
| 19 | } |
||
| 20 | |||
| 21 | public function getDescription(): string |
||
| 22 | { |
||
| 23 | return $this->description; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getSellValue(): Coin |
||
| 27 | { |
||
| 28 | return $this->sellValue; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getBuyValue(): Coin |
||
| 34 | } |
||
| 35 | |||
| 36 | public function __toString(): string |
||
| 37 | { |
||
| 38 | return $this->getName(); |
||
| 41 |