HeadersProperty   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A headers() 0 3 2
1
<?php
2
3
namespace GinoPane\NanoRest\Supplemental;
4
5
/**
6
 * Trait HeadersProperty
7
 */
8
trait HeadersProperty
9
{
10
    /**
11
     * List of headers for a request
12
     *
13
     * @var Headers
14
     */
15
    private $headers = null;
16
17
    /**
18
     * Retrieve object's headers
19
     *
20
     * @return Headers
21
     */
22
    public function headers(): Headers
23
    {
24
        return !is_null($this->headers) ? $this->headers : ($this->headers = new Headers());
25
    }
26
}
27