StandardAttribute::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 2
1
<?php
2
3
namespace RoyallTheFourth\HtmlDocument\Attribute;
4
5
final class StandardAttribute implements AttributeInterface
6
{
7
    private $name;
8
    private $value;
9
10
    public function __construct(string $name, string $value)
11
    {
12
        $this->name = $name;
13
        $this->value = $value;
14
    }
15
16
    public function render(): string
17
    {
18
        return "{$this->name}=\"{$this->value}\"";
19
    }
20
}
21