| Total Complexity | 3 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 7 | class QuantityFormatterDefinition |
||
| 8 | { |
||
| 9 | /** @var class-string<QuantityFormatterInterface> */ |
||
|
|
|||
| 10 | private string $formatterClass; |
||
| 11 | |||
| 12 | /** @var FractionUnitInterface|null|string */ |
||
| 13 | private $fractionUnit; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @param class-string<QuantityFormatterInterface> $formatterClass |
||
| 17 | * @param FractionUnitInterface|string|null $fractionUnit |
||
| 18 | */ |
||
| 19 | public function __construct(string $formatterClass, $fractionUnit = null) |
||
| 20 | { |
||
| 21 | $this->formatterClass = $formatterClass; |
||
| 22 | $this->fractionUnit = $fractionUnit; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @return class-string<QuantityFormatterInterface> |
||
| 27 | */ |
||
| 28 | public function formatterClass(): string |
||
| 29 | { |
||
| 30 | return $this->formatterClass; |
||
| 31 | } |
||
| 32 | |||
| 33 | public function getFractionUnit() |
||
| 36 | } |
||
| 37 | } |
||
| 38 |