Passed
Push — master ( 80ddec...cae974 )
by Caen
03:33 queued 12s
created

MetadataItem::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 2
dl 0
loc 2
rs 10
1
<?php
2
3
namespace Hyde\Framework\Models\Metadata;
4
5
use Hyde\Framework\Contracts\MetadataItemContract;
6
7
class MetadataItem implements MetadataItemContract, \Stringable
8
{
9
    public function __construct(protected string $name, protected string $content)
10
    {
11
    }
12
13
    public function __toString(): string
14
    {
15
        return '<meta name="'.e($this->name).'" content="'.e($this->content).'">';
16
    }
17
18
    public function uniqueKey(): string
19
    {
20
        return $this->name;
21
    }
22
}
23