Total Complexity | 5 |
Total Lines | 20 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class OpenGraphItem implements MetadataItemContract, \Stringable |
||
8 | { |
||
9 | public function __construct(protected string $property, protected string $content) |
||
10 | { |
||
11 | $this->normalizeProperty(); |
||
12 | } |
||
13 | |||
14 | public function __toString(): string |
||
15 | { |
||
16 | return '<meta property="'.e($this->property).'" content="'.e($this->content).'">'; |
||
17 | } |
||
18 | |||
19 | public function uniqueKey(): string |
||
20 | { |
||
21 | return substr($this->property, 3); |
||
22 | } |
||
23 | |||
24 | protected function normalizeProperty(): void |
||
27 | } |
||
28 | } |
||
29 |