Completed
Push — master ( d41a26...1c5167 )
by Gabriel
04:02
created

HasHeadersTrait::getHeaders()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 1
ccs 0
cts 2
cp 0
crap 2
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 4
    public function setHeaders(\Symfony\Component\HttpFoundation\HeaderBag $headers)
31
    {
32 4
        $this->headers = $headers;
33 4
    }
34
}
35