HttpWriter   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 19
ccs 0
cts 7
cp 0
rs 10
c 1
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A header() 0 3 1
A responseCode() 0 3 1
A echo() 0 3 1
A flush() 0 2 1
1
<?php
2
3
namespace ByJG\RestServer\Writer;
4
5
class HttpWriter implements WriterInterface
6
{
7
    public function header($header, $replace = true)
8
    {
9
        header($header, $replace);
10
    }
11
12
    public function responseCode($responseCode, $description)
13
    {
14
        $this->header("HTTP/1.1 $responseCode $description");
15
    }
16
17
    public function echo($data)
18
    {
19
        echo $data;
20
    }
21
22
    public function flush()
23
    {
24
        // Do nothing.
25
    }
26
}
27