Passed
Push — develop ( 71b03c...334703 )
by Brent
32:34 queued 24:49
created

Header   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 22
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A make() 0 4 1
A __toString() 0 4 1
1
<?php
2
3
namespace Pageon\Http;
4
5
class Header
6
{
7
    private $name;
8
9
    private $content;
10
11
    public function __construct(string $name, ?string $content = null)
12
    {
13
        $this->name = $name;
14
        $this->content = $content;
15
    }
16
17
    public static function make(string $name, ?string $content = null): Header
18
    {
19
        return new self($name, $content);
20
    }
21
22
    public function __toString(): string
23
    {
24
        return "{$this->name}: {$this->content}";
25
    }
26
}
27