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

HasHeadersTrait   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
dl 0
loc 24
rs 10
c 1
b 0
f 1
ccs 2
cts 4
cp 0.5
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setHeaders() 0 3 1
A getHeaders() 0 3 1
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