| Total Complexity | 3 |
| Total Lines | 16 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | final class ContentEncoding |
||
| 13 | { |
||
| 14 | private $value; |
||
| 15 | |||
| 16 | 18 | public function __construct(string $value) |
|
| 17 | { |
||
| 18 | 18 | if (!Str::of($value)->matches('~^[\w\-]+$~')) { |
|
| 19 | 2 | throw new DomainException; |
|
| 20 | } |
||
| 21 | |||
| 22 | 16 | $this->value = $value; |
|
| 23 | 16 | } |
|
| 24 | |||
| 25 | 10 | public function __toString(): string |
|
| 28 | } |
||
| 29 | } |
||
| 30 |