These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
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
|
|||
22 | { |
||
23 | 8 | return $this[Arg::BODY]; |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * @return array |
||
28 | */ |
||
29 | 1 | function headers() |
|
0 ignored issues
–
show
|
|||
30 | { |
||
31 | 1 | return $this[Arg::HEADERS] ?: []; |
|
32 | } |
||
33 | |||
34 | /** |
||
35 | * @return string |
||
36 | */ |
||
37 | 6 | function reason() |
|
0 ignored issues
–
show
|
|||
38 | { |
||
39 | 6 | return $this[Arg::REASON]; |
|
40 | } |
||
41 | |||
42 | /** |
||
43 | * @return int |
||
44 | */ |
||
45 | 4 | function status() |
|
0 ignored issues
–
show
|
|||
46 | { |
||
47 | 4 | return $this[Arg::STATUS]; |
|
48 | } |
||
49 | |||
50 | /** |
||
51 | * @return int |
||
52 | */ |
||
53 | 4 | function version() |
|
0 ignored issues
–
show
|
|||
54 | { |
||
55 | 4 | return $this[Arg::VERSION]; |
|
56 | } |
||
57 | } |
||
58 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.