HtmlResponse::getHeaders()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
3
namespace Codeat3\FoaasClient\Response;
4
5
use Codeat3\FoaasClient\ResponseFilters\FoaasFilter;
6
7
class HtmlResponse implements FoaasResponse
8
{
9
    /**
10
     * A header string for the request.
11
     *
12
     * @var string
13
     */
14
    protected $acceptHeader = 'text/html';
15
16
    /**
17
     * Returns the header type.
18
     *
19
     * @return string
20
     */
21
    public function getHeaders(): string
22
    {
23
        return $this->acceptHeader;
24
    }
25
26
    /**
27
     * Returns a response.
28
     *
29
     * @param string $response
30
     *
31
     * @return string
32
     */
33
    public function response(string $response, FoaasFilter $filter)
34
    {
35
        return $filter->filter($response);
36
    }
37
}
38