XmlApiResponse   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 22
ccs 0
cts 8
cp 0
rs 10
c 1
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getEncodedData() 0 4 1
1
<?php
2
3
namespace Kelemen\ApiNette\Response;
4
5
use Nette\Utils\JsonException;
6
7
class XmlApiResponse extends BaseApiResponse
8
{
9
    /**
10
     * @param int $code
11
     * @param string $data
12
     * @param string $contentType
13
     * @param string $charset
14
     */
15
    public function __construct($code, $data = '', $contentType = 'application/xml', $charset = 'utf-8')
16
    {
17
        parent::__construct($code, $data, $contentType, $charset);
18
    }
19
20
    /**
21
     * @return string
22
     * @throws JsonException
23
     */
24
    public function getEncodedData()
25
    {
26
        return $this->data;
27
    }
28
}
29