HtmlOutputProcessor   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Test Coverage

Coverage 71.43%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 15
ccs 5
cts 7
cp 0.7143
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getErrorHandler() 0 3 1
A getFormatter() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
namespace ByJG\RestServer\OutputProcessor;
4
5
use ByJG\Serializer\Formatter\PlainTextFormatter;
6
use Whoops\Handler\PrettyPageHandler;
7
8
class HtmlOutputProcessor extends BaseOutputProcessor
9
{
10 1
    public function __construct()
11
    {
12 1
        $this->contentType = "text/html";
13 1
    }
14
15
    public function getErrorHandler()
16
    {
17
        return new PrettyPageHandler();
18
    }
19
20 1
    public function getFormatter()
21
    {
22 1
        return new PlainTextFormatter();
23
    }
24
}
25