TextPlainResponse::render()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 0
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
}