Completed
Push — master ( f172d4...76e139 )
by devosc
02:14
created

Response::headers()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 2
eloc 2
nc 2
nop 0
crap 2
1
<?php
2
/**
3
 *
4
 */
5
6
namespace Mvc5\Http\Config;
7
8
use Mvc5\Arg;
9
use Mvc5\Config\Config;
10
11
trait Response
12
{
13
    /**
14
     *
15
     */
16
    use Config;
17
18
    /**
19
     * @return string
20
     */
21 8
    function body()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
22
    {
23 8
        return $this[Arg::BODY];
24
    }
25
26
    /**
27
     * @return array
28
     */
29 1
    function headers()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
30
    {
31 1
        return $this[Arg::HEADERS] ?: [];
32
    }
33
34
    /**
35
     * @return string
36
     */
37 6
    function reason()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
38
    {
39 6
        return $this[Arg::REASON];
40
    }
41
42
    /**
43
     * @return int
44
     */
45 4
    function status()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
46
    {
47 4
        return $this[Arg::STATUS];
48
    }
49
50
    /**
51
     * @return int
52
     */
53 4
    function version()
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
54
    {
55 4
        return $this[Arg::VERSION];
56
    }
57
}
58