Completed
Pull Request — master (#10)
by Joao
03:35
created

XmlOutputProcessor   A

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 __construct() 0 3 1
A getFormatter() 0 3 1
A getErrorHandler() 0 3 1
1
<?php
2
3
namespace ByJG\RestServer\OutputProcessor;
4
5
use ByJG\Serializer\Formatter\XmlFormatter;
6
use Whoops\Handler\XmlResponseHandler;
7
8
class XmlOutputProcessor extends BaseOutputProcessor
9
{
10 1
    public function __construct()
11
    {
12 1
        $this->contentType = "text/xml";
13 1
    }
14
15
    public function getErrorHandler()
16
    {
17
        return new XmlResponseHandler();
18
    }
19
20 1
    public function getFormatter()
21
    {
22 1
        return new XmlFormatter();
23
    }
24
}
25