HtmlOutputProcessor   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 20
ccs 4
cts 8
cp 0.5
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getDetailedErrorHandler() 0 3 1
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\RestServer\Whoops\PlainResponseErrorHandler;
6
use ByJG\Serializer\Formatter\PlainTextFormatter;
7
use Whoops\Handler\PrettyPageHandler;
8
9
class HtmlOutputProcessor extends BaseOutputProcessor
10
{
11 1
    public function __construct()
12
    {
13 1
        $this->contentType = "text/html";
14
    }
15
16
    public function getDetailedErrorHandler()
17
    {
18
        return new PrettyPageHandler();
19
    }
20
21
    public function getErrorHandler()
22
    {
23
        return new PlainResponseErrorHandler();
24
    }
25
26 1
    public function getFormatter()
27
    {
28 1
        return new PlainTextFormatter();
29
    }
30
}
31