| Total Complexity | 3 |
| Total Lines | 21 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | final class JsonSchemaLinkHeaderModule extends AbstractModule |
||
| 16 | { |
||
| 17 | /** @param string $jsonSchemaHost Json-schema host name ex) https://example.com/schema/ */ |
||
| 18 | public function __construct( |
||
| 19 | private readonly string $jsonSchemaHost, |
||
| 20 | AbstractModule|null $module = null, |
||
| 21 | ) { |
||
| 22 | if (! filter_var($jsonSchemaHost, FILTER_VALIDATE_URL)) { |
||
| 23 | throw new InvalidSchemaUriException($jsonSchemaHost); |
||
| 24 | } |
||
| 25 | |||
| 26 | parent::__construct($module); |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * {@inheritDoc} |
||
| 31 | */ |
||
| 32 | #[Override] |
||
| 36 | } |
||
| 37 | } |
||
| 38 |