Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
16 | public function __construct(string $url, \DateTimeImmutable $lastModified, float $priority = 0.9) |
||
17 | { |
||
18 | if ($priority > 1 || $priority < 0) { |
||
19 | throw new \InvalidArgumentException(sprintf('A sitemap url priority can\'t be higher than 1 or below 0. Value given "%s"', $priority)); |
||
20 | } |
||
21 | |||
22 | $this->url = $url; |
||
23 | $this->lastModified = $lastModified; |
||
24 | $this->priority = $priority; |
||
25 | } |
||
26 | |||
42 |