Passed
Pull Request — master (#11)
by Joao
02:01
created

HtmlOutputProcessor::getDetailedErrorHandler()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
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