| Total Complexity | 5 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 5 | class Formula |
||
| 6 | { |
||
| 7 | public function __construct(private ?string $value, private readonly FormulaEngine $formulaEngine) |
||
| 12 | } |
||
| 13 | } |
||
| 14 | |||
| 15 | private function validate(string $value): void |
||
| 16 | { |
||
| 17 | $error = $this->formulaEngine->validate($value); |
||
| 18 | if ($error !== null) { |
||
| 19 | throw new FormulaEngineException($error); |
||
| 20 | } |
||
| 21 | } |
||
| 22 | |||
| 23 | public function value(): ?string |
||
| 26 | } |
||
| 27 | } |
||
| 28 |