Test Setup Failed
Push — master ( fc6567...89d4a6 )
by Gabriel
07:58
created

HasHeadersTrait::setHeaders()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Nip\Router\RequestContext\Traits;
4
5
/**
6
 * Trait HasHeadersTrait
7
 * @package Nip\Router\RequestContext\Traits
8
 */
9
trait HasHeadersTrait
10
{
11
12
    /**
13
     * Headers (taken from the $_SERVER).
14
     *
15
     * @var \Symfony\Component\HttpFoundation\HeaderBag
16
     */
17
    protected $headers;
18
19
    /**
20
     * @return \Symfony\Component\HttpFoundation\HeaderBag
21
     */
22
    public function getHeaders(): \Symfony\Component\HttpFoundation\HeaderBag
23
    {
24
        return $this->headers;
25
    }
26
27
    /**
28
     * @param \Symfony\Component\HttpFoundation\HeaderBag $headers
29
     */
30
    public function setHeaders(\Symfony\Component\HttpFoundation\HeaderBag $headers)
31
    {
32
        $this->headers = $headers;
33
    }
34
}
35