| Conditions | 3 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function __construct(?string $url = null, ?string $data = null) |
||
| 21 | { |
||
| 22 | if (null === $data && null === $url) { |
||
| 23 | throw new InvalidArgumentException('Either data or url must be set.'); |
||
| 24 | } |
||
| 25 | |||
| 26 | // TODO: ensure data, if provided, is valid jsonld |
||
| 27 | $this->data = $data; |
||
| 28 | $this->url = $url; |
||
| 29 | } |
||
| 62 |