StandardAttribute   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 16
c 0
b 0
f 0
wmc 2
lcom 1
cbo 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A render() 0 4 1
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