TextPlainResponse   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 4
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A render() 0 7 1
1
<?php
2
3
namespace Preetender\Routing\Response;
4
5
/**
6
 * Class TextPlainResponse
7
 * @package Preetender\Routing\Response
8
 */
9
final class TextPlainResponse extends BaseResponse
10
{
11
    /**
12
     * Inform headers for text requests
13
     *
14
     * @var array
15
     */
16
    protected $headers = [];
17
18
    /**
19
     * Format and return to requester
20
     *
21
     * @return mixed
22
     */
23
    public function render()
24
    {
25
        $this->response->setContent($this->wrapped->render());
26
        $this->response->headers->add($this->headers);
27
        $this->response->prepare($this->request);
28
        $this->response->send();
29
    }
30
}