| Total Complexity | 5 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 12 | ||
| Bugs | 4 | Features | 0 |
| 1 | <?php |
||
| 10 | trait PageSchema |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * The title of the page used in the HTML <title> tag, among others. |
||
| 14 | * |
||
| 15 | * @example "Home", "About", "Blog Feed" |
||
| 16 | */ |
||
| 17 | public string $title; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * The settings for how the page should be presented in the navigation menu. |
||
| 21 | */ |
||
| 22 | #[ArrayShape(['title' => 'string', 'hidden' => 'bool', 'priority' => 'int'])] |
||
| 23 | public ?array $navigation = null; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * The canonical URL of the page. |
||
| 27 | * |
||
| 28 | * @var string|null |
||
| 29 | */ |
||
| 30 | public ?string $canonicalUrl = null; |
||
| 31 | |||
| 32 | protected function constructPageSchema(): void |
||
| 37 | } |
||
| 38 | |||
| 39 | protected function makeCanonicalUrl(): ?string |
||
| 52 |